Changes

Jump to navigation Jump to search
474 bytes added ,  04:08, 17 June 2012
no edit summary
|The following one-liner creates an archive {{Code|archive.zip}} with one file {{Code|file.txt}}:
<pre class="brush:xquery">
archive:create(<archive:entry>file.txt</archive:entry>, 'Hello World')
</pre>
The following function creates an archive {{Code|mp3.zip}}, which contains all MP3 files of a local directory:
|-
| width='90' | '''Signatures'''
|{{Func|archive:entries|$zip as xs:base64Binary|element(archive:entry)*}}<br />
|-
| '''Summary'''
sum(archive:entries(file:read-binary('zip.zip'))/@size)
</pre>
|}
 
==archive:options==
 
{| width='100%'
|-
| width='90' | '''Signatures'''
|{{Func|archive:options|$zip as xs:base64Binary|element(archive:options)*}}<br />
|-
| '''Summary'''
|Returns the options of the given zip archive, as specified by the [[#archive:create|archive:create]] function.
|-
| '''Errors'''
|{{Error|ARCH0002|#Errors}} The packing format is not supported.<br/>{{Error|ARCH9999|#Errors}} archive creation failed for some other reason.
|}
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu