Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »



Function: ZipExtract()

Extracts a named file from an archive file

As well as zip files other common archive files are supported include tar and 7z.

Typically the archive file will have been fetch via an http action and the contents will be the body that was returned

If the filename isn't predefined then zipListFiles can be used to read the available filenames.


Syntax

zipListFiles(zipFile, filename, [charset])

ArgumentTypeDescription
zipFileStringThe contents of the archive file
filenameStringThe filename to extract
charsetStringThe charset to use for the resultant file, or binary. Default is null which autodetects the charset from the file

Examples


zipExtract(in.body, 'PackageHeader.xml')

where in.body is the archive body. Returns the PackageHeader.xml file as a string, autodetecting whether the file is encoded as UTF8, UTF16 or another encoding.


See Also

  • No labels