Changes

Jump to navigation Jump to search
1,517 bytes removed ,  20:09, 22 April 2011
no edit summary
|-
| valign='top' | '''Summary'''
|Returns the directory separator.
|-
| valign='top' | '''Rules'''
|This variable returns the directory separator used by the operating system, such as "/" or "\".<br />
|}
|-
| valign='top' | '''Summary'''
|Returns the path separator.
|-
| valign='top' | '''Rules'''
|This variable returns the path separator used by the operating system, such as ";" or ":".<br />
|}
|-
| valign='top' | '''Summary'''
|Checks if a path exist.
|-
| valign='top' | '''Rules'''
|This function returns an <code>xs:boolean</code> indicating whether a file or directory specified by <code>$path</code> exists in the file system.<br />
|}
|-
| valign='top' | '''Summary'''
|Checks if a path points to a directory.
|-
| valign='top' | '''Rules'''
|This function returns an <code>xs:boolean</code> indicating whether the argument <code>$path</code> points to an existing directory.<br />
|}
|-
| valign='top' | '''Summary'''
|Checks if a path points to a file.
|-
| valign='top' | '''Rules'''
|This function returns an <code>xs:boolean</code> indicating whether the argument <code>$path</code> points to an existing file.<br />
|}
|-
| valign='top' | '''Summary'''
|Returns the timestamp of a path.
|-
| valign='top' | '''Rules'''
|This function retrieves the timestamp of the last modification of the file or directory specified by <code>$path</code>.<br />
|-
|-
| valign='top' | '''Summary'''
|Returns the size of a file.
|-
| valign='top' | '''Rules'''
|This function returns the size, in bytes, of the file specified by <code>$path</code>.<br />
|-
|-
| valign='top' | '''Summary'''
|Returns the base-name of a path.
|-
| valign='top' | '''Rules'''
|This function returns the base-name of the path specified by <code>$path</code>, which is the component after the last directory separator.<br /> If <code>$suffix</code> is specified, it will be trimmed from the end of the result.<br />
|}
|-
| valign='top' | '''Summary'''
|Returns the parent directory of a path.
|-
| valign='top' | '''Rules'''
|This function returns the parent directory of the path specified by <code>$path</code>, which is the component before the last directory separator.<br />
|}
|-
| valign='top' | '''Summary'''
|Returns a native path representation.
|-
| valign='top' | '''Rules'''
|This function transforms the <code>$path</code> argument to its native representation on the operating system.<br />
|-
|-
| valign='top' | '''Summary'''
|Returns a full path representation.
|-
| valign='top' | '''Rules'''
|This function transforms the <code>$path</code> argument to an absolute operating system path.<br />
|}
|-
| valign='top' | '''Summary'''
|Returns a URI representation.
|-
| valign='top' | '''Rules'''
|This function transforms the path specified by <code>$path</code> into a URI with the <code>file://</code> scheme.<br />
|}
|-
| valign='top' width='90' | '''Signatures'''
|<code><b>file:list</b>($path directory as xs:string) as xs:string*</code><br /><code><b>file:list</b>($path directory as xs:string, $recursive as xs:boolean) as xs:string*</code><br /><code><b>file:list</b>($path directory as xs:string, $recursive as xs:boolean, $pattern as xs:string) as xs:string*</code><br />
|-
| valign='top' | '''Summary'''
|Lists the contents of a directory.|-| valign='top' | '''Rules'''|This function lists all files and directories found in the directory that is specified by <code>$pathdirectory</code>. The returned paths are relative to the provided path.<br />The optional parameter <code>$recursive</code> specifies whether the sub-directories are to be recursed as well.<br />The optional parameter <code>$pattern</code> defines a file name pattern in the [http://en.wikipedia.org/wiki/Glob_(programming) glob syntax]. If present, only those files and directories are returned that correspond to the pattern. Several patterns can be separated with a comma (<code>,</code>).<br />
|-
| valign='top' | '''Errors'''
|-
| valign='top' | '''Summary'''
|Creates a new directory path.
|-
| valign='top' | '''Rules'''
|This function recursively creates the directories specified by <code>$path</code>.<br />
|-
|-
| valign='top' | '''Summary'''
|Deletes a file or directory.
|-
| valign='top' | '''Rules'''
|This function recursively deletes a file or directory specified by <code>$path</code>.<br />
|-
|-
| valign='top' | '''Summary'''
|Reads the contents a file.
|-
| valign='top' | '''Rules'''
|This function reads the textual contents of the file specified by <code>$path</code> and returns it as a <code>xs:string</code>.<br />The optional parameter <code>$encoding</code> defines the encoding of the file.<br />
|-
|-
| valign='top' | '''Summary'''
|Reads the binary contents of a file.
|-
| valign='top' | '''Rules'''
|This function reads the binary content of the file specified by <code>$path</code> and returns as a <code>xs:base64Binary</code>.<br />
|-
|-
| valign='top' | '''Summary'''
|Writes a sequence of items to a file.|-| valign='top' | '''Rules'''|This function writes a sequence, specified by of <code>$items</code>, to a file specified by <code>$path</code>. If the specified file already exists, it will be overwritten.<br />The optional argument <code>$params</code> is used to set the serialization parameters (see [[Serialization]] for more details).<br />
|-
| valign='top' | '''Errors'''
|-
| valign='top' width='90' | '''Signatures'''
|<code><b>file:write-binary</b>($path as xs:string, $item items as xs:base64Binary) as empty-sequence()</code><br />
|-
| valign='top' | '''Summary'''
|Writes a sequence of items to a file.|-| valign='top' | '''Rules'''|This function writes a sequence of <code>xs:basex64Binary</code> item specified by <code>$itemitems</code> to a file specified by <code>$path</code>. If the specified file already exists, it will be overwritten.<br />
|-
| valign='top' | '''Errors'''
|-
| valign='top' | '''Summary'''
|Appends a sequence of items to a file.|-| valign='top' | '''Rules'''|This function appends a sequence of <code>$items</code>, to a file specified by <code>$path</code>. If the specified file does not exists, a new file is created.<br />
|-
| valign='top' | '''Errors'''
|-
| valign='top' width='90' | '''Signatures'''
|<code><b>file:append-binary</b>($path as xs:string, $item items as xs:base64Binary) as empty-sequence()</code><br />
|-
| valign='top' | '''Summary'''
|Writes a sequence of items to a file.|-| valign='top' | '''Rules'''|This function appends a sequence of <code>xs:basex64Binary</code> <code>$items</code>, to a file specified by <code>$path</code>. If the specified file does not exists, a new file is created.<br />
|-
| valign='top' | '''Errors'''
|-
| valign='top' | '''Summary'''
|Copies a file.
|-
| valign='top' | '''Rules'''
|This function copies a file specified by <code>$source</code> to the file or directory specified by <code>$target</code>. If the target represents an existing file, it will be overwritten. No operation will be performed if the source and target path are equal.<br />
|-
|-
| valign='top' | '''Summary'''
|Moves a file.|-| valign='top' | '''Rules'''|This function moves, or renames, the file or directory specified by <code>$source</code> to the path specified by <code>$target</code>. No operation will be performed if the source and target path are equal.<br />
|-
| valign='top' | '''Errors'''
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu