PLCnext API Documentation
21.0.0.35466
|
Provides common file directory operations. More...
#include <IDirectoryService.hpp>
Public Types | |
typedef std::shared_ptr< IDirectoryService > | Ptr |
typedef delegate< void(IRscReadEnumerator< FileSystemEntry > &)> | EnumerateFileSystemEntriesResultDelegate |
typedef delegate< void(IRscReadEnumerator< FileSystemTraitsEntry > &)> | EnumerateFileSystemTraitsEntriesResultDelegate |
Public Types inherited from Arp::System::Rsc::Services::IRscService | |
typedef std::shared_ptr< IRscService > | Ptr |
Public Member Functions | |
IDirectoryService (void) | |
Constructs an IDirectoryService instance. More... | |
virtual | ~IDirectoryService (void) |
Destructs this instance and frees all resouces. More... | |
virtual boolean | Exists (const RscString< 512 > &path)=0 |
Checks if the specified directory exists. More... | |
virtual FileSystemError | Create (const RscString< 512 > &path)=0 |
Creates the specified directory. More... | |
virtual FileSystemError | Delete (const RscString< 512 > &path)=0 |
Deletes the specified directory and its content. More... | |
virtual FileSystemError | Clear (const RscString< 512 > &path)=0 |
Removes the content of the specified directory, but does not delete the specified directory itself. More... | |
virtual FileSystemError | Move (const RscString< 512 > &sourcePath, const RscString< 512 > &destinationPath, boolean clear=false)=0 |
Moves the specified directory and its content to the given new location. More... | |
virtual FileSystemError | Copy (const RscString< 512 > &sourcePath, const RscString< 512 > &destinationPath, boolean clear=false)=0 |
Copies the specified directory and its content to the given new location. More... | |
virtual void | EnumerateFileSystemEntries (const RscString< 512 > &path, const RscString< 512 > &searchPattern, boolean recursive, EnumerateFileSystemEntriesResultDelegate resultDelegate)=0 |
Enumerates all files and subdirectories of the specified directory. More... | |
virtual void | EnumerateFileSystemTraitsEntries (const RscString< 512 > &path, const RscString< 512 > &searchPattern, Traits traits, boolean recursive, EnumerateFileSystemTraitsEntriesResultDelegate resultDelegate)=0 |
Enumerates all files and subdirectories of the specified directory. 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 directory operations.
The path separator is always '/'.
|
inline |
Constructs an IDirectoryService instance.
|
inlinevirtual |
Destructs this instance and frees all resouces.
|
pure virtual |
Removes the content of the specified directory, but does not delete the specified directory itself.
path | The path of the directory to clear. |
|
pure virtual |
Copies the specified directory and its content to the given new location.
sourcePath | The source path of the directory to copy. |
destinationPath | The destination path of the directory to copy all content to. |
clear | If set to true the destination location is cleared first if it yet exists and the operation succeeds anyway while returning true . Otherwise, if the destination yet exists, the operations fails and returns false . |
|
pure virtual |
Creates the specified directory.
path | The path of the directory to create. |
|
pure virtual |
Deletes the specified directory and its content.
path | The path of the directory to delete. |
|
pure virtual |
Enumerates all files and subdirectories of the specified directory.
path | The path of the directory to search in. |
searchPattern | The pattern of the files to enumerate. |
recursive | if set to true the files of all subdirectories are liested as well. |
|
pure virtual |
Enumerates all files and subdirectories of the specified directory.
path | The path of the directory to search in. |
searchPattern | The pattern of the files to enumerate. |
traits | The selection of traits to get. |
recursive | if set to true the files of all subdirectories are liested as well. |
|
pure virtual |
Checks if the specified directory exists.
path | The path of the directory to check. |
true
if the directory exists, otherwise false
.
|
pure virtual |
Moves the specified directory and its content to the given new location.
sourcePath | The source path of the directory to move. |
destinationPath | The destination path of the directory to move all content to. |
clear | If set to true the destination location is cleared first if it yet exists and the operation succeeds anyway while returning true . Otherwise, if the destination yet exists, the operations fails and returns false . |