Downloads a file using HTTP and stores it on the device.
Allowed Extensions:
[
    "txt",                // Plain Text
    "rtf",                // Rich Text Format
    "pdf",                // PDF - Portable Document Format
    "md",                 // Markdown
    "xls", "xlsx",        // Microsoft Excel
    "csv",                // CSV - Comma-Separated Values
    "gsheet",             // Google Sheets
    "ppt", "pptx",        // Microsoft PowerPoint
    "doc", "docx",        // Microsoft Word
    "gdoc",               // Google Docs
    "jpg", "jpeg",        // JPEG Image
    "png",                // PNG Image
    "gif",                // GIF Image
    "mp3",                // MP3 Audio
    "wav",                // WAV Audio
    "mp4",                // MP4 Video
    "avi",                // AVI Video
    "zip",                // ZIP Archive
    "rar",                // RAR Archive
    "epub",               // EPUB Ebook
    "mobi",               // Kindle Ebook
    "key",                // Adobe Acrobat Keynote (for Apple Keynote presentations)
    "pages",              // Apple Pages
    "numbers",            // Apple Numbers
    "keynote"             // Apple Keynote
]
Example:
await Eitri.fs.download({
 url: "https://domain.com/file-to-download",
 fileName: "invoice-02-2023.pdf",
})
- API LEVEL
4- Functionality added
Delete a previously downloaded file.
Example:
 await Eitri.fs.delete({fileName: "invoice-02-2023.pdf"})
- API LEVEL
4- Functionality added
Open a previously downloaded file.
Example:
 let eitriFile = await Eitri.fs.download({
   url: "https://domain.com/file-to-download",
   fileName: "invoice-02-2023.pdf",
 })
 await Eitri.fs.open({fileName: eitriFile.fileName})
- API LEVEL
4- Functionality added
Share a previously downloaded file using system share sheet
Example:
await Eitri.fs.share({
 fileName: "invoice-02-2023.pdf",
})
- API LEVEL
4- Functionality added
Select documents from the file system.
Example:
 let fileList = await Eitri.fs.openFilePicker({
   fileExtension: ["pdf", "jpg", "png"],
   maxSize: 6291456,
   allowsMultipleSelection: false
 })
 if(fileList.length > 0){
     const base64EncodedDescriptor = await fileList[0].toBase64()
     // ...
 }
- API LEVEL
6- Functionality added
Select images from the system
Example:
 let fileList = await Eitri.fs.openImagePicker({
   maxSize: 6291456,
   allowsMultipleSelection: false
 })
 if(fileList.length > 0){
     const base64EncodedDescriptor = await fileList[0].toBase64()
     // ...
 }
- API LEVEL
18- Functionality added on Android >= 5 and iOS >=14
Generated using TypeDoc
Methods for filesystem access.