xdmp.zipManifest

xdmp.zipManifest(
   zipfile as binary()
) as Array

Summary

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.

Example

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"
    },
...
]
Powered by MarkLogic Server | Terms of Use | Privacy Policy