With the Filesystem adapter, you can write, read, remove directories and retrieve status information about a directory.
Directory Alias
Regarding directories, the Filesystem adapter can be configured with an directory alias. The Directory alias specifies a path to a directory and the default encoding for the contained files. You can use it for static directory access or to define a base path and encoding for file and directory handling (see also Static and Dynamic Filesystem Access below).
Creating a Directory
Using the createDirectory operation of the Filesystem adapter, you can create a new directory to the filesystem.
Multiexcerpt include |
---|
MultiExcerptName | createDirectory |
---|
PageWithExcerpt | Filesystem |
---|
shouldDisplayInlineCommentsInIncludes | false |
---|
|
The adapter call does not return any messages. If the directory already exists, no error will be reported. Neither the existing directory nor data within that directory will be affected in this case.
Removing a Directory
Removing an Empty Directory
Using the remove operation of the Filesystem adapter on a directory, you can delete an empty directory from the filesystem.
Multiexcerpt include |
---|
MultiExcerptName | remove_directory |
---|
PageWithExcerpt | Filesystem |
---|
shouldDisplayInlineCommentsInIncludes | false |
---|
|
You can only remove empty directories using remove. In case the directory is not empty, use removeRecursively (see below).
Removing a Directory and all its Contents
Using the removeRecursively operation of the Filesystem adapter, you can delete a directory and all its contents from the filesystem.
Multiexcerpt include |
---|
MultiExcerptName | removeRecursively_directory |
---|
PageWithExcerpt | Filesystem |
---|
shouldDisplayInlineCommentsInIncludes | false |
---|
|
Reading the Contents of a Directory
Using the readDirectory operation of the Filesystem adapter, you can get a list of the contents of a directory in the filesystem.
Multiexcerpt include |
---|
MultiExcerptName | readDirectory |
---|
PageWithExcerpt | Filesystem |
---|
shouldDisplayInlineCommentsInIncludes | false |
---|
|
Using the status operation of the Filesystem adapter on a directory, you can get some general information on the directory.
Multiexcerpt include |
---|
MultiExcerptName | status |
---|
PageWithExcerpt | Filesystem |
---|
shouldDisplayInlineCommentsInIncludes | false |
---|
|
Static and Dynamic Filesystem Access
Multiexcerpt include |
---|
MultiExcerptName | static_dynamic_access |
---|
PageWithExcerpt | Handling of Files |
---|
shouldDisplayInlineCommentsInIncludes | false |
---|
|