A module for performing various operations on files and directories stored in the server file system.
Delete a file or directory. This method is only available to the DBA role.
$path | The full path or URI to the file |
List all files, including their file size and modification time, found in or below a directory, $directory. Files are located in the server's file system, using filename patterns, $pattern. File pattern matching is based on code from Apache's Ant, thus following the same conventions. For example:
'*.xml' matches any file ending with .xml in the current directory,
- '**/*.xml' matches files in any directory below the specified directory. This method is only available to the DBA role.
$path | The base directory path or URI in the file system where the files are located. |
$pattern | The file name pattern |
Tests if a file or directory exists. This method is only available to the DBA role.
$path | The full path or URI to the file in the file system |
Tests if a path is a directory. This method is only available to the DBA role.
$path | The full path or URI to the file or directory |
Tests if a file is readable. This method is only available to the DBA role.
$path | The full path or URI to the file |
Tests if a file is writeable. This method is only available to the DBA role.
$path | The full path or URI to the file |
List all files and directories under the specified directory. This method is only available to the DBA role.
$path | The directory path or URI in the file system. |
Create a directory. This method is only available to the DBA role.
$path | The full path or URI to the directory |
Create a directory including any necessary but nonexistent parent directories. This method is only available to the DBA role.
$path | The full path or URI to the directory |
Move (rename) a file or directory. Exact operation is platform dependent. This method is only available to the DBA role.
$original | The full path or URI to the file |
$destination | The full path or URI to the file |
Reads the content of file. This method is only available to the DBA role.
$path | The directory path or URI in the file system. |
Reads the content of file. This method is only available to the DBA role.
$path | The directory path or URI in the file system. |
$encoding | The encoding type for the file |
Reads the contents of a binary file. This method is only available to the DBA role.
$path | The directory path or URI in the file system. |
Reads the contents of a file. Unicode BOM (Byte Order Marker) will be stripped off if found. This method is only available to the DBA role.
$path | The directory path or URI in the file system. |
Reads the contents of a file. Unicode BOM (Byte Order Marker) will be stripped off if found. This method is only available to the DBA role.
$path | The directory path or URI in the file system. |
$encoding | The file is read with the encoding specified. |
Writes the node set into a file on the file system. $parameters contains a sequence of zero or more serialization parameters specified as key=value pairs. The serialization options are the same as those recognized by "declare option exist:serialize". The function does NOT automatically inherit the serialization options of the XQuery it is called from. This method is only available to the DBA role.
$node-set* | The contents to write to the file system. |
$path | The full path or URI to the file |
$parameters* | The serialization parameters: either a sequence of key=value pairs or an output:serialization-parameters element as defined by the standard fn:serialize function. |
Writes the node set into a file on the file system, optionally appending to it. $parameters contains a sequence of zero or more serialization parameters specified as key=value pairs. The serialization options are the same as those recognized by "declare option exist:serialize". The function does NOT automatically inherit the serialization options of the XQuery it is called from. This method is only available to the DBA role.
$node-set* | The contents to write to the file system. |
$path | The full path or URI to the file |
$parameters* | The serialization parameters: either a sequence of key=value pairs or an output:serialization-parameters element as defined by the standard fn:serialize function. |
$append | Should content be appended? |
Writes binary data into a file on the file system. This method is only available to the DBA role.
$binarydata | The contents to write to the file system. |
$path | The full path or URI to the file |
Writes binary data into a file on the file system, optionally appending the content. This method is only available to the DBA role.
$binarydata | The contents to write to the file system. |
$path | The full path or URI to the file |
$append | Should content be appended? |
Synchronize a collection with a directory hierarchy. Compares last modified time stamps. If $dateTime is given, only resources modified after this time stamp are taken into account. This method is only available to the DBA role.
$collection | The collection to sync. |
$targetPath | The full path or URI to the directory |
$dateTime? | Optional: only resources modified after the given date/time will be synchronized. |