Accessing the filesystem
See original GitHub issueWhat’s the recommended approach for an Ionic+Capacitor app to access the filesystem via Electron?
There’s a couple of options:
- Ionic’s File plugin: https://ionicframework.com/docs/native/file
- Capacitor’s Filesystem plugin: https://capacitorjs.com/docs/apis/filesystem
But none of them allow me to access for example my home directory ~
.
With pure Electron I can just use fs
but that’s not an option here as I’d like it to work with Android as well.
A recommended approach and perhaps a code example would be really appreciated as the current docs are only focused on iOS and Android for these plugins.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:11 (1 by maintainers)
Top Results From Across the Web
File System Access API - MDN Web Docs - Mozilla
This API allows interaction with files on a user's local device, or on a user-accessible network file system. Core functionality of this API ......
Read more >The File System Access API: simplifying access to local files
The File System Access API enables developers to build powerful web apps that interact with files on the user's local device, such as...
Read more >Windows file system access and privacy - Microsoft Support
In Windows 10, go to Start > Settings > Privacy > File system and make sure Allow apps to access your file system...
Read more >Getting Started With the File System Access API - CSS-Tricks
The File System Access API is a web API that allows read and write access to a user's local files. It unlocks new...
Read more >File System Access
This API enables developers to build powerful apps that interact with other (non-Web) apps on the user's device via the device's file system....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I added a pull-request to the default Capacitor plugins repo that adds support for Electron to the Filesystem plugin: https://github.com/ionic-team/capacitor-plugins/pull/792
I also join the question
I found out that the files saved with
await Filesystem.writeFile ({ path: ‘AAAAtext222.txt’, data: ‘This is a test’, directory: Directory.Documents, encoding: Encoding.UTF8, });
in the electron assembly for winodws 10
Save to IndexedDB
I would like to save the files in the root of the program, so where exe. Who knows how?