V8 Javascript API

zip.async Class Reference

Description

Asynchronous variants of the zip compression API. The functions take the same parameters as the synchronous version as input and return a Promise. These promises resolve with the results of the operation or reject if any argument is invalid.

Note:

Like all other asynchronous functionality any command using these functions must return a Promise.

Static Functions

Promise extract( String path, String destination, String pattern, String password)
Extracts a zip archive asynchronously and returns the extracted files as a Promise. More...

Functions

Promise zip.​async.extract( String path, String destination, String pattern, String password) [static]

Extracts a zip archive asynchronously and returns the extracted files as a Promise.

Parameters

path
Path to the zip archive to extract.
destination
Destination directory for the zip archive to be extracted to.
pattern
Optional wildcard pattern used to selectively extract matching files. For example: '*.txt'. Only the '*' wildcard is supported, and matches zero or more arbitrary characters.
password
Optional password used for extracting password protected archives.

Returns

Returns a Promise that resolves to an array of extracted filenames.