
xdmp.zipManifest( zipfile as binary() ) as Array
Return a manifest for this zip file. The manifest contains information about what is in the zip file. The form of the manifest is: Each part is a file within the zip. The attributes specify the uncompressed size for the file, the compressed size for that file, whether or not the file is encrypted, and the last-modified timestamp. Note that MarkLogic cannot extract encrypted files, attempting to do so will cause an error. Also note that due to a limitation in the zip file format, the last-modified time has a granularity of two seconds (e.g. 10:22:33 becomes 10:22:32).
| Parameters | |
|---|---|
| zipfile | The zip document binary node. |
xdmp.zipManifest(xdmp.documentGet("/Documents/corpus.zip"));
===>
[
{
"uncompressedSize":0,
"compressedSize":0,
"encrypted":false,
"lastModified":"2014-10-02T09:50:38",
"path":"corpus/"
},
{
"uncompressedSize":7,
"compressedSize":7,
"encrypted":false,
"lastModified":"2014-10-02T09:50:00",
"path":"corpus/banana"
},
{
"uncompressedSize":6,
"compressedSize":6,
"encrypted":false,
"lastModified":"2014-10-02T09:50:14",
"path":"corpus/apple"
},
...
]
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.