Plugin to extract ZIP files in Cordova 3.X
Plugin receives the file name and path "/home/user/.../file.zip" and returns the path to the folder where ZIP is extracted.
$ cordova plugin add https://github.com/michogar/extract-zipfile.git
var ZipClient = new ExtractZipFilePlugin();
/**
*
* @param {String} filename path complete to the file (e.g. '/home/user/file.zip')
* @param {function} onSuccessCallback
* @param {function} onErrorCallback
*
*/
ZipClient.extractFile(filename, onSuccessCallback, onErrorCallback);
/**
*
* @param {String} filepath
*
*/
function onSuccessCallback(filepath) {
<... code ...>
}
/**
*
* @param {Object} err
*
*/
function onErrorCallback(err) {
<... code ...>
}