Example
//unzip file
var sourcePath = "/some/path/to.zip";
var destPath = "/your/dest/path";
siteKiosk.io.zip.unzip(sourcePath, destPath, function(success, errorMessage) {
if(success) {
console.log("Unzipped!");
}
// error handling...
});
Methods
-
<static> unzip(sourceFilePath, destinationDirPath, completed)
-
Unzips a specified ZIP file to a destination directory.
Parameters:
Name Type Description sourceFilePath
string The path where the ZIP file is stored destinationDirPath
string A path to an directory where the ZIP file contents should be extracted to completed
siteKiosk.io.zip~unzipCallback A callback to be invoked when the operation completes
Type Definitions
-
unzipCallback(success, errorMessage)
-
A callback, being invoked when an unzip operation completes.
Parameters:
Name Type Description success
boolean Whether the unzip operation has been completed successfully errorMessage
string An error message or an empty string if the operation has been completed successfully