Retrieve data into to local file system from electron web browser


We are developing a desktop application that needs to integrate with a web application based on a secure API service and online database. What we want to do is call data down from the online database using a web browser instance and then pass this through to the pc file system - essentially to synchronise the data in a local database with the web database.

i.e. What is the best way to retrieve data from memory or local session storage in the electron web browser instance and use it in other local parts of the application?


If you want to access the file system, you should use the methods provided by the node API. They are available everywhere in your electron javascript contexts. Check out this to get started:

Actually, now that I think about it, maybe elecron runs on io.js. So either the link I posted or the io.js equivalent


Electron uses io.js, but the APIs are all 100% compatible. Use joyent’s docs for reference.