Zip2.unzip()

Unzip the specified .zip file and write the decompressed files/directories as contents of the specified destination directory.

Usage

Hover over inputs/exits for more info.

var Zip2 = require('machinepack-zip-2');


// Unzip the specified .zip file and write the decompressed files/directories as contents of the specified destination directory.

Zip2.unzip({

source: '/Users/mikermcneil/stuff.zip',

destination: '/Users/mikermcneil/my-stuff',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function () {

 

},

});

Inputs

source required

The path (relative or absolute) to the .zip archive.

'/Users/mikermcneil/stuff.zip'
destination required

The path (relative or absolute) to a directory where contents should be extracted.

'/Users/mikermcneil/my-stuff'

Exits

error

An unexpected error occurred.

success

OK.