@nativescript/zip
TypeScript icon, indicating that this package has built-in type declarations

6.0.0 • Public • Published

@nativescript/zip

npm install @nativescript/zip

Usage

Zip

see ZipOptions

import { Zip } from '@nativescript/zip';
import { path, knownFolders } from '@nativescript/core';
let zipPath = path.join(knownFolders.temp().path, 'stuff.zip');
let dest = path.join(knownFolders.documents().path, '/assets');
Zip.zip({
    directory: dest,
		archive: zipPath
});

Progress

import { Zip } from '@nativescript/zip';
import { path, knownFolders } from '@nativescript/core';
let zipPath = path.join(knownFolders.temp().path, 'stuff.zip');
let dest = path.join(knownFolders.documents().path, '/assets');
Zip.zip({
function onZipProgress(percent: number) {
	console.log(`unzip progress: ${percent}`);
    directory: dest,
		archive: zipPath,
    onProgress: onZipProgress
});

Unzip

see UnzipOptions

import { Zip } from '@nativescript/zip';
import { path, knownFolders } from '@nativescript/core';
let zipPath = path.join(knownFolders.temp().path, 'stuff.zip');
let dest = path.join(knownFolders.documents().path, '/assets');
Zip.unzip({
	archive: zipPath,
	directory: dest,
});

Progress

import { Zip } from '@nativescript/zip';
import { path, knownFolders } from '@nativescript/core';
let zipPath = path.join(knownFolders.temp().path, 'stuff.zip');
let dest = path.join(knownFolders.documents().path, '/assets');
Zip.unzip({
	archive: zipPath,
	directory: dest,
	onProgress: onUnZipProgress,
});

function onUnZipProgress(percent: number) {
	console.log(`unzip progress: ${percent}`);
}

License

Apache License Version 2.0

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 6.0.0
    811
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 6.0.0
    811
  • 5.0.0
    34

Package Sidebar

Install

npm i @nativescript/zip

Weekly Downloads

845

Version

6.0.0

License

Apache-2.0

Unpacked Size

26.6 kB

Total Files

11

Last publish

Collaborators

  • nativescript-user
  • tns-bot
  • lini
  • tachev
  • rosen-vladimirov
  • stoskov
  • rosen_vladimirov
  • walkerrunpdx
  • bradmartin
  • davecoffin
  • rigor789
  • nativescript-bot
  • multishiv19
  • eddyverbruggen
  • edusperoni
  • facetious
  • tdermendjiev
  • sis0k0