PLCnext API Documentation
21.0.0.35466
|
Provides common file operations for reading and writing files as well as deleting/moving/copying files on the device. More...
#include <IFileService.hpp>
Public Types | |
typedef std::shared_ptr< IFileService > | Ptr |
Public Types inherited from Arp::System::Rsc::Services::IRscService | |
typedef std::shared_ptr< IRscService > | Ptr |
Public Member Functions | |
IFileService (void) | |
Constructs an IFileService instance. More... | |
virtual | ~IFileService (void) |
Destructs this instance and frees all resouces. More... | |
virtual boolean | Exists (const RscString< 512 > &path)=0 |
Checks if the specified file exists. More... | |
virtual FileSystemError | Write (const RscString< 512 > &filePath, boolean overwrite, const std::vector< TraitItem > &traitItems, RscStream &data)=0 |
Writes the given data to the specified file. More... | |
virtual FileSystemError | Read (Traits fileTraits, const RscString< 512 > &filePath, RscStream &data, std::vector< TraitItem > &traitItems)=0 |
Reads the specified file from device. More... | |
virtual FileSystemError | Delete (const RscString< 512 > &filePath)=0 |
Deletes the specified file. More... | |
virtual FileSystemError | Move (boolean createDirectory, boolean overwrite, const RscString< 512 > &sourceFilePath, const RscString< 512 > &destinationFilePath)=0 |
Moves the specified file. More... | |
virtual FileSystemError | Copy (boolean createDirectory, boolean overwrite, const RscString< 512 > &sourceFilePath, const RscString< 512 > &destinationFilePath)=0 |
Copies the specified files. More... | |
Public Member Functions inherited from Arp::System::Rsc::Services::IRscService | |
IRscService (void)=default | |
Constructs an IRscService instance. More... | |
virtual | ~IRscService (void)=default |
Destructs this instance and frees all resouces. More... | |
Static Public Member Functions | |
static IRscServiceProxyFactory & | GetProxyFactory (void) |
Static Public Member Functions inherited from Arp::System::Rsc::Services::IRscService | |
static IRscServiceProxyFactory & | GetProxyFactory (void) |
Returns a reference to service proxy factory to create a proxy instance of the service More... | |
Provides common file operations for reading and writing files as well as deleting/moving/copying files on the device.
The path separator is always '/'.
|
inline |
Constructs an IFileService instance.
|
inlinevirtual |
Destructs this instance and frees all resouces.
|
pure virtual |
Copies the specified files.
createDirectory | if set to true the directory of the file is created (recursively), if it does not exists yet. |
overwrite | if set to true the destination file is overwritten, if it yet exists, otherwise an error is returned. |
sourceFilePath | The source path of the file to copy. |
destinationFilePath | The destination path of the file to copy. |
|
pure virtual |
Deletes the specified file.
filePath | The pathe of the file to delete. |
|
pure virtual |
Checks if the specified file exists.
path | Path of the file to check. |
true
if the file exists, otherwise false
.
|
pure virtual |
Moves the specified file.
createDirectory | if set to true the directory of the file is created (recursively), if it does not exists yet. |
overwrite | if set to true the destination file is overwritten, if it yet exists, otherwise an error is returned. |
sourceFilePath | The source path of the file to move. |
destinationFilePath | The destination path of the file to move. |
|
pure virtual |
Reads the specified file from device.
fileTraits | Specifies the file traits to read, if this value is not Arp.System.Commons.Services.Io.Traits.None. |
filePath | The path of the file to read. |
data | Data read from the specified file. |
traitItems | Specified trait items read from the specified file. |
|
pure virtual |
Writes the given data to the specified file.
filePath | Path of the file on the target. |
overwrite | If set to true the destination file is overwritten, if it yet exists, otherwise an error is returned. |
traitItems | Trait items to set up after writing the file. |
data | Data to writing into the specified file. |