Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Excerpt
hiddentrue

zipListFIlest(zipFile, filenamemfilename, [ charset]) Extracts a named file from an archive



Function: ZipExtract()

Extracts the content of a named file from an archive fileAs . Zip files are supported as well as zip files other common archive files are supported include file types including tar and 7z.

Typically, the archive file will have been fetch fetched via an http HTTP action in an Actionflow and the contents of the archive will be provided in the body of that was returnedrequest.

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

...

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

This returns the content of the PackageHeader.xml file as a string, autodetecting whether the file is encoded as UTF8, UTF16 or another encoding.

...