Changes

Jump to navigation Jump to search
264 bytes added ,  14:12, 29 January 2019
==file:read-text-lines==
 
{{Mark|Updated with Version 9.0:}} [[#file:read-text-lines|file:read-text-lines]]: <code>$offset</code> and <code>$length</code> arguments added.
{| width='100%'
|-
| '''Summary'''
|Creates the directory specified by {{Code|$dir}}, including all nonif it does not already exist. Non-existing parent directorieswill be created as well.<br />
|-
| '''Errors'''
|{{Error|exists|#Errors}} a file with the same path already specified target exists, but is no directory.<br />{{Error|io-error|#Errors}} the operation fails for some other reason.<br />
|}
| '''Errors'''
|{{Error|no-dir|#Errors}} the parent of specified path is no directory.<br />{{Error|is-dir|#Errors}} the specified path is a directory.<br />{{Error|io-error|#Errors}} the operation fails for some other reason.<br />
|-
| '''Examples'''
|
* <code><nowiki>file:write('data.bin', xs:hexBinary('414243'))</nowiki></code> writes a hex representation to the specified file.
* <code><nowiki>file:write('data.bin', xs:hexBinary('414243'), map { 'method': 'basex')</nowiki></code> writes binary data to the specified file (see [[XQuery_Extensions#Serialization|Serialization]] for more details).
|}
|-
| '''Summary'''
|Returns the current working directory. - This function returns the same result as the function call <code>file:resolve-path("")</code><br />.
|}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu