6.0.0 • Published 1 year ago
@enertrag/zip v6.0.0
@enertrag/zip
Capacitor archive (zip) share plugin
Install
npm install @enertrag/zip
npx cap syncAPI
isAvailable()
isAvailable() => Promise<Available>Checks if the functionality is available on the current platform.
Returns: Promise<Available>
shareArchive(...)
shareArchive(options: ZipOptions) => Promise<ZipResult>Creates a zip archive including the content of the specified directory. The created file will be saved/shared via the os's mechanisms.
| Param | Type |
|---|---|
options | ZipOptions |
Returns: Promise<ZipResult>
Interfaces
Available
| Prop | Type | Description |
|---|---|---|
available | boolean | true if available, false otherwise |
ZipResult
| Prop | Type | Description |
|---|---|---|
success | boolean | true if the file was successfully saved, false otherwise |
ZipOptions
| Prop | Type | Description |
|---|---|---|
sourceDir | string | The uri of the source directory. |
destFilename | string | The name of the destination file. |
License
MIT
Copyright © 2022 ENERTRAG SE enertrag.com