Ansehen auf __CAPGO_KEEP_0__
Anleitung
Mit @capgo/capacitor-zip
Capacitor Zip-Plugin für die Komprimierung und Extraktion von Zip-Archiven.
Installieren
bun add @capgo/capacitor-zip
bunx cap sync
Das von diesem Plugin bereitgestellte
zip- Eine Datei oder ein Verzeichnis komprimieren, um ein ZIP-Archiv zu erstellen.unzip- Ein ZIP-Archiv in ein bestimmtes Zielverzeichnis extrahieren.
Beispielhafte Verwendung
zip
Komprimieren Sie eine Datei oder ein Verzeichnis, um ein ZIP-Archiv zu erstellen.
import { CapacitorZip } from '@capgo/capacitor-zip';
// Compress a directory without password
await CapacitorZip.zip({
source: '/path/to/my-folder',
destination: '/path/to/output.zip'
});
unzip
Ein ZIP-Archiv in ein bestimmtes Zielverzeichnis extrahieren.
import { CapacitorZip } from '@capgo/capacitor-zip';
// Extract a standard ZIP archive
await CapacitorZip.unzip({
source: '/path/to/archive.zip',
destination: '/path/to/extract-folder'
});
Vollständige Referenz
- GitHub: https://github.com/Cap-go/capacitor-zip/
- Dokumentation: /docs/plugins/zip/
Weitermachen von Using @capgo/capacitor-zip
Wenn Sie Using verwenden Using @capgo/capacitor-zip um native Plugin-Arbeit zu planen, verbinden Sie es mit @capgo/capacitor-zip für die Implementierungsdetails in @capgo/capacitor-zip Anleitung zum Starten für die Implementierungsdetails in Anleitung zum Starten Capgo Plugin-Verzeichnis für das Produktworkflow in Capgo Plugin-Verzeichnis, Capacitor Plugins von Capgo für die Implementierungsdetails in Capacitor Plugins von Capgo, und Plugins hinzufügen oder aktualisieren für die Implementierungsdetails in Plugins hinzufügen oder aktualisieren.