1.0.1 • Published 8 years ago

qordova-zip v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

qordova-zip

A Q-enabled HTTP for Cordova. Easier to use than cordova-plugin-zip.

Installation

cordova plugin add cordova-plugin-zip

npm install quordova-file

Usage

unzip(zip_fname, unzip_dir)

Unzip an archive to a destination directory.

// Note that we must wrap inside `deviceready` because it uses Cordova features.
document.addEventListener("deviceready", (function() {
  Zip.unzip(zip\_fname, unzip\_dir)
  .then(function() {
    console.log('successfully unzipped');
  })
  .progress(function(progress) {
    console.log('progress', progress);
  })
  .fail(function(ZipError) {
    console.log('failed to unzip');
  });
});