Muqriz 48f16bfc3e initail first | 4 months ago | |
---|---|---|
.. | ||
.github | 4 months ago | |
test | 4 months ago | |
LICENSE | 4 months ago | |
README.md | 4 months ago | |
index.js | 4 months ago | |
package.json | 4 months ago |
npm install cross-zip
var zip = require('cross-zip')
var inPath = path.join(__dirname, 'myFolder') // folder to zip
var outPath = path.join(__dirname, 'myFile.zip') // name of output zip file
zip.zipSync(inPath, outPath)
zip.zip(inPath, outPath, [callback])
Zip the folder at inPath
and save it to a .zip file at outPath
. If a callback
is passed, then it is called with an Error
or null
.
zip.zipSync(inPath, outPath)
Sync version of zip.zip
.
zip.unzip(inPath, outPath, [callback])
Unzip the .zip file at inPath
into the folder at outPath
. If a callback
is
passed, then it is called with an Error
or null
.
zip.unzipSync(inPath, outPath)
Sync version of zip.unzip
.
This package requires .NET Framework 4.5 or later and Powershell 3. These come pre-installed on Windows 8 or later.
On Windows 7 or earlier, you will need to install these manually in order for
cross-zip
to function correctly.
MIT. Copyright © Feross Aboukhadijeh.