Capacitor archive (zip) share plugin
npm install @enertrag/zip
npx cap sync
isAvailable() => Promise<Available>
Checks if the functionality is available on the current platform.
Returns: Promise<Available>
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>
Prop | Type | Description |
---|---|---|
available |
boolean |
true if available, false otherwise |
Prop | Type | Description |
---|---|---|
success |
boolean |
true if the file was successfully saved, false otherwise |
Prop | Type | Description |
---|---|---|
sourceDir |
string |
The uri of the source directory. |
destFilename |
string |
The name of the destination file. |
MIT
Copyright © 2022 ENERTRAG SE enertrag.com