Plugin to work with external files like on an external sd-card connected over USB-OTG.
npm install capacitor-external-files
npx cap sync
dirChooser()
readDir(...)
getFileEntry(...)
readFile(...)
delete(...)
createDir(...)
writeFile(...)
copyAssetDir(...)
- Interfaces
- Enums
dirChooser() => any
Returns: any
readDir(options: { root: string; path: string; }) => any
Param | Type |
---|---|
options |
{ root: string; path: string; } |
Returns: any
getFileEntry(options: { root: string; path: string; }) => any
Param | Type |
---|---|
options |
{ root: string; path: string; } |
Returns: any
readFile(options: { root: string; path: string; encoding?: Encoding; }) => any
Param | Type |
---|---|
options |
{ root: string; path: string; encoding?: Encoding; } |
Returns: any
delete(options: { root: string; path: string; }) => any
Param | Type |
---|---|
options |
{ root: string; path: string; } |
Returns: any
createDir(options: { root: string; path: string; }) => any
Param | Type |
---|---|
options |
{ root: string; path: string; } |
Returns: any
writeFile(options: { root: string; path: string; data: string; encoding?: Encoding; }) => any
Param | Type |
---|---|
options |
{ root: string; path: string; data: string; encoding?: Encoding; } |
Returns: any
copyAssetDir(options: { assetPath: string; root: string; path: string; }) => any
Param | Type |
---|---|
options |
{ assetPath: string; root: string; path: string; } |
Returns: any
Prop | Type |
---|---|
path |
string |
name |
string |
kind |
"file" | "directory" |
modificationDate |
number |
Members | Value |
---|---|
UTF8 |
'utf8' |
ASCII |
'ascii' |
UTF16 |
'utf16' |
ISO_8859_1 |
'iso8859-1' |