Changes

Jump to navigation Jump to search
1,493 bytes added ,  18:45, 22 June 2015
no edit summary
|}
==archive:writecreate-from== {{Mark|Introduced with Version 8.3}}:
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|archive:writecreate-from|$path as xs:string, $archive as |xs:base64Binary}}<br/>{{Func|emptyarchive:create-sequencefrom|$path as xs:string, $options as item()|xs:base64Binary}}<br/>{{Func|archive:writecreate-from|$path as xs:string, $archive options as xs:base64Binaryitem(), $entries as item()*|empty-sequence()xs:base64Binary}}
|-
| '''Summary'''
|This convenience function directly writes files of creates an {{Code|$archive}} to from all files in the specified directory {{Code|$path}}.<br/>The entries {{Code|$options}} parameter contains archiving options, and the files to be written archived can be limited via {{Code|$entries}}. The format of the argument two last arguments is the same as for [[#archive:create|archive:create]] (attributes will be ignored).
|-
| '''Errors'''
|{{Error|FILE0001no-dir|File Module#Errors}} the specified path does not point to a directory.<br/>{{Error|is-dir|File Module#Errors}} one of the specified entries points to a directory.<br/>{{Error|not-found|File Module#Errors}} a specified path entry does not exist.<br/>{{Error|ARCH9999|#Errors}} archive creation failed for some other reason.|-| '''Examples'''|This example writes the files of a user’s home directory to <code>archive.zip</code>:<pre class="brush:xquery">let $zip := archive:archive-from('/home/user/')return file:write-binary('archive.zip', $zip)</pre>|} ==archive:extract-to== {{Mark|Introduced with Version 8.3}}: replaces <code>archive:write</code> {| width='100%'|-| width='120' | '''Signatures'''|{{Func|archive:extract-to|$path as xs:string, $archive as xs:base64Binary|empty-sequence()}}<br/>{{Func|archive:extract-to|$path as xs:string, $archive as xs:base64Binary, $entries as item()*|empty-sequence()}}|-| '''Summary'''|This convenience function writes files of an {{Code|$archive}} directly to the specified directory {{Code|$path}}.<br/>The archive entries to be written can be restricted via {{Code|$entries}}. The format of the argument is the same as for [[#archive:create|archive:create]] (attributes will be ignored).|-| '''Errors'''|{{Error|ARCH9999|#Errors}} archive creation failed for some other reason.
|-
| '''Examples'''
=Changelog=
 
;Version 8.3
* Added: [[#archive:create-from|archive:create-from]], [[#archive:extract-to|archive:extract-to]] (replaces <code>archive:write</code>)
;Version 7.7
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu