PLCnext API Documentation 25.0.2.69
|
Provides common file directory operations. More...
#include <IDirectoryService.hpp>
Public Types | |
using | Ptr = std::shared_ptr< IDirectoryService > |
using | EnumerateFileSystemEntriesResultDelegate = delegate< void(IRscReadEnumerator< FileSystemEntry > &)> |
using | EnumerateFileSystemTraitsEntriesResultDelegate = delegate< void(IRscReadEnumerator< FileSystemTraitsEntry > &)> |
![]() | |
using | Ptr = std::shared_ptr< IRscService > |
The shared_ptr type of IRscService. | |
Public Member Functions | |
IDirectoryService (void)=default | |
Constructs an IDirectoryService instance. | |
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... | |
![]() | |
IRscService (void)=default | |
The default constructor. | |
IRscService (const IRscService &arg)=delete | |
The deleted copy constructor. More... | |
IRscService (IRscService &&arg) noexcept=default | |
The default move constructor. More... | |
IRscService & | operator= (const IRscService &arg)=delete |
The deleted assignment operator. More... | |
IRscService & | operator= (IRscService &&arg) noexcept=default |
The default move-assignment operator. More... | |
virtual | ~IRscService (void)=default |
Destructs this instance and frees all resources. | |
Static Public Member Functions | |
static IRscServiceProxyFactory & | GetProxyFactory (void) |
![]() | |
static IRscServiceProxyFactory & | GetProxyFactory (void) |
Returns a reference to service proxy factory to create a proxy instance of this service. More... | |
Provides common file directory operations.
The path separator is always '/'.
This service is defined in library Arp.System.Commons.Services.
Realtime Usage: This API call does not have to be deterministic in runtime behaviour, so an asynchronous execution should be considered.
|
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 . |