@capacitor/filesystem
The Filesystem API provides a NodeJS-like API for working with files on the device.
Install
npm install @capacitor/filesystem
npx cap sync
iOS
To have files appear in the Files app, you must set the following keys to YES
in Info.plist
:
UIFileSharingEnabled
(Application supports iTunes file sharing
)LSSupportsOpeningDocumentsInPlace
(Supports opening documents in place
)
Read about Configuring iOS for help.
Android
If using Directory.Documents
or Directory.ExternalStorage
, in Android 10 and older, this API requires the following permissions be added to your AndroidManifest.xml
:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />