Skip to content

solvis-bs/capacitor-external-files

Repository files navigation

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()

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'