Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fortunen/cordova-plugin-zeep
Zip compression/decompression for the cordova/phonegap platform
https://github.com/fortunen/cordova-plugin-zeep
angular cordova cordova-android cordova-android-plugin cordova-ios cordova-plugin cordova-plugin-zeep decompression phonegap unzip zip zip-compression
Last synced: 4 days ago
JSON representation
Zip compression/decompression for the cordova/phonegap platform
- Host: GitHub
- URL: https://github.com/fortunen/cordova-plugin-zeep
- Owner: FortuneN
- License: apache-2.0
- Created: 2016-12-10T14:36:28.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-11-28T08:58:52.000Z (12 months ago)
- Last Synced: 2024-10-29T20:11:46.695Z (14 days ago)
- Topics: angular, cordova, cordova-android, cordova-android-plugin, cordova-ios, cordova-plugin, cordova-plugin-zeep, decompression, phonegap, unzip, zip, zip-compression
- Language: C
- Homepage:
- Size: 466 KB
- Stars: 28
- Watchers: 5
- Forks: 37
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# cordova-plugin-zeep
Zip compression/decompression on the [Apache Cordova](https://cordova.apache.org) / [PhoneGap](http://phonegap.com) platform### Platforms
- ios
- android
- windows### Add to project
```sh
cordova plugin add cordova-plugin-zeep
```### Remove from project
```sh
cordova plugin remove cordova-plugin-zeep
```### Compression (Zeep.zip or $cordovaZeep.zip)
from : [string] the path/url of the folder whose contents you want to compress
to : [string] the path/url of the zip file that you want to produce### Decompression (Zeep.unzip or $cordovaZeep.unzip)
from : [string] the path/url of the zip file that you want to decompress
to : [string] the path/url of the folder in which you want to deposit the contents of the zip file### Plain JS example
```js
var source = cordova.file.applicationDirectory,
zip = cordova.file.cacheDirectory + 'source.zip',
extracted = cordova.file.cacheDirectory + 'extracted';console.log('source : ' + source );
console.log('zip : ' + zip );
console.log('extracted : ' + extracted);console.log('zipping ...');
Zeep.zip({
from : source,
to : zip
}, function() {console.log('zip success!');
console.log('unzipping ...');Zeep.unzip({
from : zip,
to : extracted
}, function() {
console.log('unzip success!');
}, function(e) {
console.log('unzip error: ', e);
});}, function(e) {
console.log('zip error: ', e);
});
```### [Angular](https://angularjs.org) example
(+ other angular-based frameworks -> Ionic, Mobile Angular UI, LumX, MEAN, Angular Foundation, ...)
```jsvar app = angular.module('MyApp', ['ngCordova.plugins.zeep'])
...
app.controller('MyController', function($scope, $cordovaZeep) {
var source = cordova.file.applicationDirectory,
zip = cordova.file.cacheDirectory + 'source.zip',
extracted = cordova.file.cacheDirectory + 'extracted';
console.log('source : ' + source );
console.log('zip : ' + zip );
console.log('extracted : ' + extracted);
console.log('zipping ...');
$cordovaZeep.zip({
from : source,
to : zip
}).then(function() {
console.log('zip success!');
console.log('unzipping ...');
$cordovaZeep.unzip({
from : zip,
to : extracted
}).then(function() {
console.log('unzip success!');
}, function(e) {
console.log('unzip error: ', e);
});
}, function(e) {
console.log('zip error: ', e);
});
});
```### License
Apache 2.0### Buy me a beer (maybe)
If you find this plugin useful, perhaps you can buy me a beer :)[](https://paypal.me/FortuneNgwenya)