Ansehen auf __CAPGO_KEEP_0__
Anleitung
Mit @capgo/capacitor-file
Capacitor Datei-Plugin Implementiert Dateisystemoperationen ähnlich dem Cordova-File-Plugin.
Installieren
bun add @capgo/capacitor-file
bunx cap sync
Was dieses Plugin bereitstellt
requestFileSystem- Eine Dateisystemanfrage stellen.resolveLocalFileSystemURL- Eine Datei-URL auf einen Eintrag auflösen.getFile- Ein Dateieintrag erhalten.getDirectory- Ein Verzeichniseintrag erhalten.
Beispiel-Verwendung
requestFileSystem
Eine Dateisystemanfrage stellen.
import { CapacitorFile } from '@capgo/capacitor-file';
await CapacitorFile.requestFileSystem({} as RequestFileSystemOptions);
resolveLocalFileSystemURL
Ein Datei-URL auflösen zu einem Eintrag.
import { CapacitorFile } from '@capgo/capacitor-file';
await CapacitorFile.resolveLocalFileSystemURL({} as ResolveURLOptions);
getFile
Ein Datei-Eintrag erhalten.
import { CapacitorFile } from '@capgo/capacitor-file';
await CapacitorFile.getFile({} as GetFileOptions);
getDirectory
Ein Verzeichnis-Eintrag erhalten.
import { CapacitorFile } from '@capgo/capacitor-file';
await CapacitorFile.getDirectory({} as GetDirectoryOptions);
Vollständige Referenz
- GitHub: https://github.com/Cap-go/capacitor-file/
- Dokumentation: /docs/plugins/file/
Weitermachen von Using @capgo/capacitor-file
Wenn Sie Using @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-file verwenden Using @capgo/capacitor-file Um den Speicher und die Dateihandling zu planen, verbinden Sie es mit @capgo/capacitor-file für die Implementierungsdetails in @capgo/capacitor-Datei, Einstieg für die Implementierungsdetails in Einstieg, @capgo/capacitor-Daten-Speicher-SQLite für die Implementierungsdetails in @capgo/capacitor-Daten-Speicher-SQLite, Mit @capgo/capacitor-Daten-Speicher-SQLite für die native Fähigkeit in Mit @capgo/capacitor-Daten-Speicher-SQLite und @capgo/capacitor-Uploader für die Implementierungsdetails in @capgo/capacitor-Uploader.