9#include "Arp/System/Commons/Services/Io/FileService2ProxyFactory.hpp"
10#include "Arp/System/Commons/Services/Io/FileSystemError.hpp"
11#include "Arp/System/Commons/Services/Io/ReadFileData.hpp"
12#include "Arp/System/Commons/Services/Io/ReadFileInfo.hpp"
13#include "Arp/System/Commons/Services/Io/TraitItem.hpp"
14#include "Arp/System/Commons/Services/Io/Traits.hpp"
15#include "Arp/System/Commons/Services/Io/WriteFileData.hpp"
16#include "Arp/System/Core/delegate.hxx"
17#include "Arp/System/Rsc/Services/IRscReadEnumerator.hxx"
18#include "Arp/System/Rsc/Services/IRscService.hpp"
19#include "Arp/System/Rsc/Services/IRscWriteEnumerator.hxx"
20#include "Arp/System/Rsc/Services/RscStreamAdapter.hpp"
21#include "Arp/System/Rsc/Services/RscString.hxx"
25namespace Arp {
namespace System {
namespace Commons {
namespace Services {
namespace Io
39 using Ptr = std::shared_ptr<IFileService2>;
54 static IRscServiceProxyFactory& GetProxyFactory(
void);
130 virtual void ExistsMany(ExistsManyPathsDelegate pathsDelegate, ExistsManyResultDelegate resultDelegate) = 0;
139 virtual void WriteMany(WriteManyWriteFileDataDelegate writeFileDataDelegate, WriteManyResultDelegate resultDelegate) = 0;
146 virtual void ReadMany(ReadManyReadFileInfoDelegate readFileInfoDelegate, ReadManyReadFileDataDelegate readFileDataDelegate) = 0;
155 virtual void DeleteMany(DeleteManyFilePathsDelegate filePathsDelegate, DeleteManyResultDelegate resultDelegate) = 0;
160inline IRscServiceProxyFactory& IFileService2::GetProxyFactory()
162 return FileService2ProxyFactory::GetInstance();
Provides common file operations for several files in a single call.
Definition: IFileService2.hpp:37
virtual void ReadMany(ReadManyReadFileInfoDelegate readFileInfoDelegate, ReadManyReadFileDataDelegate readFileDataDelegate)=0
Reads the specified files.
IFileService2(void)=default
Constructs an IFileService2 instance.
virtual FileSystemError Delete(const RscString< 512 > &filePath)=0
Deletes the specified file.
virtual FileSystemError Read(Traits fileTraits, const RscString< 512 > &filePath, RscStreamAdapter data, std::vector< TraitItem > &traitItems)=0
Reads the specified file from device.
virtual FileSystemError Move(boolean createDirectory, boolean overwrite, const RscString< 512 > &sourceFilePath, const RscString< 512 > &destinationFilePath)=0
Moves the specified file.
virtual FileSystemError Write(const RscString< 512 > &filePath, boolean overwrite, const std::vector< TraitItem > &traitItems, RscStreamAdapter data)=0
Writes the given data to the specified file.
virtual void ExistsMany(ExistsManyPathsDelegate pathsDelegate, ExistsManyResultDelegate resultDelegate)=0
Checks if the specified files exist.
virtual boolean Exists(const RscString< 512 > &path)=0
Checks if the specified file exists.
virtual FileSystemError Copy(boolean createDirectory, boolean overwrite, const RscString< 512 > &sourceFilePath, const RscString< 512 > &destinationFilePath)=0
Copies the specified files.
virtual void DeleteMany(DeleteManyFilePathsDelegate filePathsDelegate, DeleteManyResultDelegate resultDelegate)=0
Deletes the specified files.
virtual void WriteMany(WriteManyWriteFileDataDelegate writeFileDataDelegate, WriteManyResultDelegate resultDelegate)=0
Writes the given data to the specified files.
Interface for reading an array or an enumerator. For regular enumerators UndefinedArrayLength is used...
Definition: IRscReadEnumerator.hxx:21
Base interface for all Rsc service interface.
Definition: IRscService.hpp:20
Interface for writing an array or an enumerator. For regular enumerators UndefinedArrayLength is used...
Definition: IRscWriteEnumerator.hxx:23
This class serves as adapter between Rsc streams and streams from Arp::System::Commons::Io,...
Definition: RscStreamAdapter.hpp:20
@ System
System components used by the System, Device, Plc or Io domains.
Traits
This enum is used by several file services to specify the file traits to get or set,...
Definition: Traits.hpp:19
FileSystemError
This enum is used by several file operations.
Definition: FileSystemError.hpp:19
Namespace for classes and interfaces for the Remote Service Call implementation
Root namespace for the PLCnext API