The Filesystem adapter comes with operations to be used on the file itself.
Using the status operation of the Filesystem adapter, you can get some general information on the file.
Multiexcerpt include |
---|
MultiExcerptName | status |
---|
PageWithExcerpt | Filesystem |
---|
shouldDisplayInlineCommentsInIncludes | false |
---|
|
You can use the size of a file to determine its end position for usage with the write operation.
Renaming a File
Using the rename operation of the Filesystem adapter, you can rename a file.
Multiexcerpt include |
---|
MultiExcerptName | rename |
---|
PageWithExcerpt | Filesystem |
---|
shouldDisplayInlineCommentsInIncludes | false |
---|
|
Find a list of all File System Adapter error codes on System Errors of the File System Adapter.
Error Code | Description |
---|
FSASDM/26 | Failed renaming <file name>. |
Moving a File
Using the rename operation of the Filesystem adapter, you can move a file to another location simply by providing a new path with parameter newName.
Multiexcerpt include |
---|
MultiExcerptName | rename |
---|
PageWithExcerpt | Filesystem |
---|
shouldDisplayInlineCommentsInIncludes | false |
---|
|
Info |
---|
This only works inside the same filesystem. Trying to move files to mounted filesystems will result in a "cross-device-link" error. |
Find a list of all File System Adapter error codes on System Errors of the File System Adapter.
Error Code | Description |
---|
FSASDM/26 | Failed renaming <file name>. |
Making a Copy of a File
Using the copy operation of the Filesystem adapter, you can copy a file.
Multiexcerpt include |
---|
MultiExcerptName | copy |
---|
PageWithExcerpt | Filesystem |
---|
shouldDisplayInlineCommentsInIncludes | false |
---|
|
copy supports copying huge files because it does not load the complete file into memory.
Removing a File
Using the remove operation of the Filesystem adapter, you can delete a file.
Multiexcerpt include |
---|
MultiExcerptName | remove |
---|
PageWithExcerpt | Filesystem |
---|
shouldDisplayInlineCommentsInIncludes | false |
---|
|
The adapter call does not return any messages. If the specified file does not exist, no error will be reported.