append-binary
($file as xs:string, $content as xs:base64Binary) as empty-sequence() external
Appends a sequence of Base64 items as binary to a file. |
append-text-lines
($file as xs:string, $content as xs:string*) as empty-sequence()
Appends a sequence of string to a file, each followed by a platform-dependent newline character(s), using the UTF-8 character encoding. |
append-text-lines
($file as xs:string, $content as xs:string*, $encoding as xs:string) as empty-sequence() external
Appends a sequence of string items to a file, each followed by a platform-dependent newline character(s). |
append-text
($file as xs:string, $content as xs:string) as empty-sequence()
Appends a sequence of string items to a file. |
append-text
($file as xs:string, $content as xs:string, $encoding as xs:string) as empty-sequence() external
Appends a sequence of string items to a file. |
base-name
($path as xs:string) as xs:string external
Returns the last component from the $path , deleting any trailing directory-separator characters. |
base-name
($path as xs:string, $suffix as xs:string) as xs:string
Returns the last component from the $path , deleting any trailing directory-separator characters and the $suffix . |
copy
($source as xs:string, $destination as xs:string) as empty-sequence()
Copies a file or a directory given a source and a destination path/URI. |
create-directory
($dir as xs:string) as empty-sequence() external
Creates a directory. |
delete
($path as xs:string) as empty-sequence()
Deletes a file or a directory from the file system. |
dir-name
($path as xs:string) as xs:string external
This function is the converse of file:base-name . |
directory-separator
() as xs:string external
This function returns the value of the operating system specific directory separator. |
exists
($path as xs:string) as xs:boolean
Tests if a path/URI is already used in the file system. |
exists
($path as xs:string, $follow-symlinks as xs:boolean) as xs:boolean external
Tests if a path/URI is already used in the file system. |
glob-to-regex
($pattern as xs:string) as xs:string
A helper function that performs a trivial (not complete) glob to regex pattern translation. |
is-directory
($path as xs:string) as xs:boolean external
Tests if a path/URI points to a directory. |
is-file
($path as xs:string) as xs:boolean external
Tests if a path/URI points to a file. |
is-symlink
($path as xs:string) as xs:boolean external
Tests if a path/URI points to symbolic link. |
last-modified
($path as xs:string) as xs:dateTime external
Retrieves the timestamp of the last modification of the file system item pointed by the path/URI. |
list
($dir as xs:string) as xs:string* external
Lists the file system items in a certain directory. |
list
($path as xs:string, $recursive as xs:boolean) as xs:string*
Lists the file system items in a certain directory. |
list
($path as xs:string, $recursive as xs:boolean, $pattern as xs:string) as xs:string*
Lists all files matching the given pattern in a given directory. |
move
($source as xs:string, $destination as xs:string) as empty-sequence()
Moves a file or directory given a source and a destination paths/URIs. |
path-separator
() as xs:string external
This function returns the value of the operating system specific path separator. |
path-to-native
($path as xs:string) as xs:string external
Transforms a URI, an absolute path, or relative path to a native path on the running platform. |
path-to-uri
($path as xs:string) as xs:anyURI external
Transforms a file system path into a URI with the file:// scheme. |
read-binary
($file as xs:string) as xs:base64Binary external
Reads the content of a file and returns a Base64 representation of the content. |
read-text-lines
($file as xs:string) as xs:string*
Reads the content of a file and returns a sequence of strings representing the lines in the content of the file. |
read-text-lines
($file as xs:string, $encoding as xs:string) as xs:string* external
Reads the content of a file using the specified encoding and returns a sequence of strings representing the lines in the content of the file. |
read-text
($file as xs:string) as xs:string
Reads the content of a file and returns a string representation of the content. |
read-text
($file as xs:string, $encoding as xs:string) as xs:string external
Reads the content of a file using the specified encoding and returns a string representation of the content. |
resolve-path
($path as xs:string) as xs:string external
Transforms a relative path/URI into an absolute operating system path by resolving it against the current working directory. |
size
($file as xs:string) as xs:integer external
Retrieves the size of a file. |
write-binary
($file as xs:string, $content as xs:base64Binary) as empty-sequence() external
Writes a sequence of Base64 items as binary to a file. |
write-text-lines
($file as xs:string, $content as xs:string*) as empty-sequence()
Writes a sequence of strings to a file, each followed by a platform-dependent newline character(s), using the UTF-8 character encoding. |
write-text-lines
($file as xs:string, $content as xs:string*, $encoding as xs:string) as empty-sequence() external
Writes a sequence of strings to a file, each followed by a platform-dependent newline character(s). |
write-text
($file as xs:string, $content as xs:string) as empty-sequence()
Writes a sequence of strings to a file using the UTF-8 character encoding. |
write-text
($file as xs:string, $content as xs:string, $encoding as xs:string) as empty-sequence() external
Writes a sequence of strings to a file. |
declare %an:sequential function file:append-binary($file as xs:string, $content as xs:base64Binary) as empty-sequence() external
$filedoes not exist, a new file will be created.
declare %an:sequential function file:append-text-lines($file as xs:string, $content as xs:string*) as empty-sequence()
declare %an:sequential function file:append-text-lines($file as xs:string, $content as xs:string*, $encoding as xs:string) as empty-sequence() external
$content
as.declare %an:sequential function file:append-text($file as xs:string, $content as xs:string) as empty-sequence()
declare %an:sequential function file:append-text($file as xs:string, $content as xs:string, $encoding as xs:string) as empty-sequence() external
$content
as.declare function file:base-name($path as xs:string) as xs:string external
$path, deleting any trailing directory-separator characters. If
$pathconsists entirely directory-separator characters, the empty string is returned. If
$pathis the empty string, the string
"."is returned, signifying the current directory. No path existence check is made.
declare function file:base-name($path as xs:string, $suffix as xs:string) as xs:string
$path, deleting any trailing directory-separator characters and the
$suffix. If path consists entirely directory-separator characters, the empty string is returned. If path is the empty string, the string
"."is returned, signifying the current directory. No path existence check is made. The
$suffixcan be used for example to eliminate file extensions.
declare %an:nondeterministic %an:sequential function file:copy($source as xs:string, $destination as xs:string) as empty-sequence()
declare %an:sequential function file:create-directory($dir as xs:string) as empty-sequence() external
declare %an:nondeterministic %an:sequential function file:delete($path as xs:string) as empty-sequence()
$pathpoints to a directory the directory will be deleted recursively.
declare function file:dir-name($path as xs:string) as xs:string external
file:base-name. It returns a string denoting the parent directory of the
$path. Any trailing directory-separator characters are not counted as part of the directory name. If path is the empty string or contains no directory-separator string,
"."is returned, signifying the current directory. No path existence check is made.
declare function file:directory-separator() as xs:string external
/on Unix-based systems and
\on Windows systems.
declare %an:nondeterministic function file:exists($path as xs:string) as xs:boolean
$path
points to an existing file system item; for symbolic links, retuns true if the linked-to item exists.declare %an:nondeterministic function file:exists($path as xs:string, $follow-symlinks as xs:boolean) as xs:boolean external
true
, follows symbolic links.$path
points to an existing file system item.declare function file:glob-to-regex($pattern as xs:string) as xs:string
declare %an:nondeterministic function file:is-directory($path as xs:string) as xs:boolean external
$path
points to a directory; for symbolic links, returns true if the linked-to item is a directory.declare %an:nondeterministic function file:is-file($path as xs:string) as xs:boolean external
$path
points to a file; for symbolic links, returns true if the linked-to item is a file.declare %an:nondeterministic function file:is-symlink($path as xs:string) as xs:boolean external
$path
points to a symbolic link.declare %an:nondeterministic function file:last-modified($path as xs:string) as xs:dateTime external
declare %an:nondeterministic function file:list($dir as xs:string) as xs:string* external
file:list($dir, fn:false()).
declare %an:nondeterministic function file:list($path as xs:string, $recursive as xs:boolean) as xs:string*
$path. If
$recursiveevaluates to
fn:true(), the operation will recurse in the subdirectories.
declare %an:nondeterministic function file:list($path as xs:string, $recursive as xs:boolean, $pattern as xs:string) as xs:string*
*for matching any number of unknown characters
?for matching one unknown character
declare %an:sequential function file:move($source as xs:string, $destination as xs:string) as empty-sequence()
declare function file:path-separator() as xs:string external
:on Unix-based systems and
;on Windows systems.
declare function file:path-to-native($path as xs:string) as xs:string external
$path.
declare function file:path-to-uri($path as xs:string) as xs:anyURI external
path.
declare %an:nondeterministic function file:read-binary($file as xs:string) as xs:base64Binary external
declare %an:nondeterministic function file:read-text-lines($file as xs:string) as xs:string*
file:read-text-lines($file, "UTF-8").
declare %an:nondeterministic function file:read-text-lines($file as xs:string, $encoding as xs:string) as xs:string* external
declare %an:nondeterministic function file:read-text($file as xs:string) as xs:string
file:read-text($file, "UTF-8").
declare %an:nondeterministic function file:read-text($file as xs:string, $encoding as xs:string) as xs:string external
declare function file:resolve-path($path as xs:string) as xs:string external
declare %an:nondeterministic function file:size($file as xs:string) as xs:integer external
declare %an:sequential function file:write-binary($file as xs:string, $content as xs:base64Binary) as empty-sequence() external
declare %an:sequential function file:write-text-lines($file as xs:string, $content as xs:string*) as empty-sequence()
declare %an:sequential function file:write-text-lines($file as xs:string, $content as xs:string*, $encoding as xs:string) as empty-sequence() external
$content
as.declare %an:sequential function file:write-text($file as xs:string, $content as xs:string) as empty-sequence()
declare %an:sequential function file:write-text($file as xs:string, $content as xs:string, $encoding as xs:string) as empty-sequence() external
$content
as.