PLCnext API Documentation 23.6.0.37
|
API for manipulation and examiniation of directories of a file system. More...
#include <Directory.hpp>
Public Member Functions | |
Directory (const Directory &arg)=delete | |
Directory & | operator= (const Directory &arg)=delete |
ARP_DEPRECATED ("Please use Directory::Move() instead of Directory::Rename().") static void Rename(const String &sourcePath | |
Static Public Member Functions | |
static bool | Exists (const String &path) |
Checks if a specific directory exists. More... | |
static void | Create (const String &path) |
Creates a new directory. After successful operation, the synchronization of the file system will be forced. More... | |
static void | Create (const String &path, bool sync) |
Creates a new directory. More... | |
static void | Delete (const String &path) |
Deletes a directory. After successful operation, the synchronization of the file system will be forced. More... | |
static void | Delete (const String &path, bool sync) |
Deletes a directory. More... | |
static void | Clear (const String &path) |
Deletes the complete content of a directory. After successful operation, the synchronization of the file system will be forced. More... | |
static void | Clear (const String &path, bool sync) |
Deletes the complete content of a directory. More... | |
static void | Copy (const String &sourcePath, const String &destinationPath, bool clear=false) |
Copies a directory and its content to a new location. After successful operation, the synchronization of the file system will be forced. More... | |
static void | Copy (const String &sourcePath, const String &destinationPath, bool clear, bool sync) |
Copies a directory and its content to a new location. More... | |
static void | Move (const String &sourcePath, const String &destinationPath, bool overwrite=false) |
Moves a directory and its content to a new location. After successful operation, the synchronization of the file system will be forced. More... | |
static void | Move (const String &sourcePath, const String &destinationPath, bool overwrite, bool sync) |
Moves a directory and its content to a new location. More... | |
static String | GetCurrent (void) |
Returns the fully qualified path of the current directory. More... | |
static void | SyncAll (void) |
Force global file system synchronization. | |
static void | Sync (const String &path) |
Force file system synchronization for the given file. More... | |
static IEnumerator< String >::Ptr | GetEnumerator (const String &path, bool recursive=false) |
Returns an enumerator listing the content of a directory. More... | |
static IEnumerator< String >::Ptr | GetEnumerator (const String &path, const char *searchPattern, bool recursive=false) |
Returns an enumerator listing the content of a directory that matches the search pattern. More... | |
static IEnumerator< String >::Ptr | GetFileEnumerator (const String &path, bool recursive=false) |
Like Arp::System::Commons::Io::Directory::GetEnumerator but only files are listed by the returned enumeration object. More... | |
static IEnumerator< String >::Ptr | GetFileEnumerator (const String &path, const char *searchPattern, bool recursive=false) |
Like Arp::System::Commons::Io::Directory::GetEnumerator but only files are listed by the returned enumeration object. More... | |
static IEnumerator< String >::Ptr | GetDirectoryEnumerator (const String &path, bool recursive=false) |
Like Arp::System::Commons::Io::Directory::GetEnumerator but only directories are listed by the returned enumeration object. More... | |
static IEnumerator< String >::Ptr | GetDirectoryEnumerator (const String &path, const char *searchPattern, bool recursive=false) |
Like Arp::System::Commons::Io::Directory::GetEnumerator but only directories are listed by the returned enumeration object. More... | |
static IEnumerator< String >::Ptr | TryGetEnumerator (const String &path, bool recursive=false) |
Like Arp::System::Commons::Io::Directory::GetEnumerator but will not throw any exception. More... | |
static IEnumerator< String >::Ptr | TryGetEnumerator (const String &path, const char *searchPattern, bool recursive=false) |
Like Arp::System::Commons::Io::Directory::GetEnumerator but will not throw any exception. More... | |
static IEnumerator< String >::Ptr | TryGetFileEnumerator (const String &path, bool recursive=false) |
Like Arp::System::Commons::Io::Directory::GetFileEnumerator but will not throw any exception. More... | |
static IEnumerator< String >::Ptr | TryGetFileEnumerator (const String &path, const char *searchPattern, bool recursive=false) |
Like Arp::System::Commons::Io::Directory::GetFileEnumerator but will not throw any exception. More... | |
static IEnumerator< String >::Ptr | TryGetDirectoryEnumerator (const String &path, bool recursive=false) |
Like Arp::System::Commons::Io::Directory::GetDirectoryEnumerator but will not throw any exception. More... | |
static IEnumerator< String >::Ptr | TryGetDirectoryEnumerator (const String &path, const char *searchPattern, bool recursive=false) |
Like Arp::System::Commons::Io::Directory::GetDirectoryEnumerator but will not throw any exception. More... | |
Public Attributes | |
const String & | destinationPath |
API for manipulation and examiniation of directories of a file system.
Arp::System::Commons::Io::Directory::ARP_DEPRECATED | ( | "Please use Directory::Move() instead of Directory::Rename()." | ) | const & |
sourcePath | Fully qualified path of directory/file to rename. |
destinationPath | Fully qualified path of destination. |
Arp::System::Commons::Io::AlreadyExistsException | if the destination folder/file already exists |
Arp::System::Commons::Io::NotExistException | if the source folder/file does not exist |
</deprecated>
|
static |
Deletes the complete content of a directory. After successful operation, the synchronization of the file system will be forced.
path | Fully qualified path of directory to clear. |
Arp::System::Commons::Io::NotExistException | if the directory to delete does not exist. |
Arp::System::Commons::Io::AccessDeniedException | if the process does not have permission to delete the directory. |
|
static |
Deletes the complete content of a directory.
path | Fully qualified path of directory to clear. |
sync | If set to true , the synchronization of the file system is forced after successful operation. |
Arp::System::Commons::Io::NotExistException | if the directory to delete does not exist. |
Arp::System::Commons::Io::AccessDeniedException | if the process does not have permission to delete the directory. |
|
static |
Copies a directory and its content to a new location.
sourcePath | Fully qualified path of directory to copy. |
destinationPath | Fully qualified path of destination. |
clear | If set to true and the destination folder already exists, it will be deleted beforehand. Default value is false. |
sync | If set to true , the synchronization of the file system is forced after successful operation. |
Arp::System::Commons::Io::AlreadyExistsException | if the destination folder already exists and parameter clear is set to false. |
Arp::System::Commons::Io::AccessDeniedException | if the destination folder already exists and can not be deleted in case clear is set to true. |
|
static |
Copies a directory and its content to a new location. After successful operation, the synchronization of the file system will be forced.
sourcePath | Fully qualified path of directory to copy. |
destinationPath | Fully qualified path of destination. |
clear | If set to true and the destination folder already exists, it will be deleted beforehand. Default value is false. |
Arp::System::Commons::Io::AlreadyExistsException | if the destination folder already exists and parameter clear is set to false. |
Arp::System::Commons::Io::AccessDeniedException | if the destination folder already exists and can not be deleted in case clear is set to true. |
|
static |
Creates a new directory. After successful operation, the synchronization of the file system will be forced.
path | The fully qualified path to the directory to create. |
Arp::System::Commons::Io::AccessDeniedException | if the application lacks the rights to create a new directory at the specified location. |
Arp::System::Commons::Io::AlreadyExistsException | if a file or directory with the specified path already exists. |
|
static |
Creates a new directory.
path | The fully qualified path to the directory to create. |
sync | If set to true , the synchronization of the file system is forced after successful operation. |
Arp::System::Commons::Io::AccessDeniedException | if the application lacks the rights to create a new directory at the specified location. |
Arp::System::Commons::Io::AlreadyExistsException | if a file or directory with the specified path already exists. |
|
static |
Deletes a directory. After successful operation, the synchronization of the file system will be forced.
path | Fully qualified path of directory to delete. |
Arp::System::Commons::Io::NotExistException | if the directory to delete does not exist. |
Arp::System::Commons::Io::AccessDeniedException | if the process does not have permission to delete the directory. |
|
static |
Deletes a directory.
path | Fully qualified path of directory to delete. |
sync | If set to true , the synchronization of the file system is forced after successful operation. |
Arp::System::Commons::Io::NotExistException | if the directory to delete does not exist. |
Arp::System::Commons::Io::AccessDeniedException | if the process does not have permission to delete the directory. |
|
static |
Checks if a specific directory exists.
path | Fully qualified path of directory to be checked. |
|
static |
Returns the fully qualified path of the current directory.
|
inlinestatic |
Like Arp::System::Commons::Io::Directory::GetEnumerator but only directories are listed by the returned enumeration object.
path | The fully qualified path of the directory to list the content of. |
recursive | Set to true if the contents of sub-directories should also be included in the enumeration object. |
s
|
inlinestatic |
Like Arp::System::Commons::Io::Directory::GetEnumerator but only directories are listed by the returned enumeration object.
path | The fully qualified path of the directory to list the content of. |
searchPattern | A pattern each directory content must match to be included inside the enumeration object. E.g. "*.cpp". |
recursive | Set to true if the contents of sub-directories should also be included in the enumeration object. |
|
inlinestatic |
Returns an enumerator listing the content of a directory.
path | The fully qualified path of the directory to list the content of. |
recursive | Set to true if the contents of sub-directories should also be included in the enumeration object. |
|
inlinestatic |
Returns an enumerator listing the content of a directory that matches the search pattern.
path | The fully qualified path of the directory to list the content of. |
searchPattern | A pattern each directory content must match to be included inside the enumeration object. E.g. "*.cpp". |
recursive | Set to true if the contents of sub-directories should also be included in the enumeration object. |
|
inlinestatic |
Like Arp::System::Commons::Io::Directory::GetEnumerator but only files are listed by the returned enumeration object.
path | The fully qualified path of the directory to list the content of. |
recursive | Set to true if the contents of sub-directories should also be included in the enumeration object. |
s
|
inlinestatic |
Like Arp::System::Commons::Io::Directory::GetEnumerator but only files are listed by the returned enumeration object.
path | The fully qualified path of the directory to list the content of. |
searchPattern | A pattern each directory content must match to be included inside the enumeration object. E.g. "*.cpp". |
recursive | Set to true if the contents of sub-directories should also be included in the enumeration object. |
|
static |
Moves a directory and its content to a new location.
sourcePath | Fully qualified path of directory to move. |
destinationPath | Fully qualified path of destination. |
overwrite | If set to true and destinationPath already exists, it will be overwritten. |
sync | If set to true , the synchronization of the file system is forced after successful operation. |
Arp::System::Commons::Io::AlreadyExistsException | if the destination folder already exists and parameter clear is set to false. |
Arp::System::Commons::Io::AccessDeniedException | if the destination folder already exists and can not be deleted in case clear is set to true. |
|
static |
Moves a directory and its content to a new location. After successful operation, the synchronization of the file system will be forced.
sourcePath | Fully qualified path of directory to move. |
destinationPath | Fully qualified path of destination. |
overwrite | If set to true and destinationPath already exists, it will be overwritten. |
Arp::System::Commons::Io::AlreadyExistsException | if the destination folder already exists and parameter clear is set to false. |
Arp::System::Commons::Io::AccessDeniedException | if the destination folder already exists and can not be deleted in case clear is set to true. |
|
static |
Force file system synchronization for the given file.
path | Path to the file to be synchronized. |
|
inlinestatic |
Like Arp::System::Commons::Io::Directory::GetDirectoryEnumerator but will not throw any exception.
path | The fully qualified path of the directory to list the content of. |
searchPattern | A pattern each directory content must match to be included inside the enumeration object. E.g. "*.cpp". |
recursive | Set to true if the contents of sub-directories should also be included in the enumeration object. |
|
inlinestatic |
Like Arp::System::Commons::Io::Directory::GetDirectoryEnumerator but will not throw any exception.
path | The fully qualified path of the directory to list the content of. |
searchPattern | A pattern each directory content must match to be included inside the enumeration object. E.g. "*.cpp". |
recursive | Set to true if the contents of sub-directories should also be included in the enumeration object. |
|
inlinestatic |
Like Arp::System::Commons::Io::Directory::GetEnumerator but will not throw any exception.
path | The fully qualified path of the directory to list the content of. |
recursive | Set to true if the contents of sub-directories should also be included in the enumeration object. |
|
inlinestatic |
Like Arp::System::Commons::Io::Directory::GetEnumerator but will not throw any exception.
path | The fully qualified path of the directory to list the content of. |
searchPattern | A pattern each directory content must match to be included inside the enumeration object. E.g. "*.cpp". |
recursive | Set to true if the contents of sub-directories should also be included in the enumeration object. |
|
inlinestatic |
Like Arp::System::Commons::Io::Directory::GetFileEnumerator but will not throw any exception.
path | The fully qualified path of the directory to list the content of. |
recursive | Set to true if the contents of sub-directories should also be included in the enumeration object. |
|
inlinestatic |
Like Arp::System::Commons::Io::Directory::GetFileEnumerator but will not throw any exception.
path | The fully qualified path of the directory to list the content of. |
searchPattern | A pattern each directory content must match to be included inside the enumeration object. E.g. "*.cpp". |
recursive | Set to true if the contents of sub-directories should also be included in the enumeration object. |