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