javascriptwebkitlocal-storagegoogle-chrome-apphtml5-filesystem

Is there an implementation of WebKit that allows accessing local filesystem easily?


I am creating a small app in HTML/CSS/JavaScript. Internet access is unavailable, and so it must run entirely offline. A researcher will be using the app to collect data, and a CSV file will be generated with this data for the research to analyze.

JS has built in security mechanisms to prevent access to the local file system. My current plan is to build a Chrome app, store everything in chrome.storage, and eventually write to a file using Chrome's chrome.fileSystem. This isn't ideal though, as it requires the researcher to grant access for every file (I'm not sure if you can grant access to folders?), or require the researcher to "download" files as opposed to having them simply be written to disk.

I am looking for a solution that would be as seamless as reading/writing to local files in other languages (Java, Python). I thought perhaps there may be a build of WebKit that allows this, or some chrome flags that I can set. Are there any better solutions?


Solution

  • nw.js (formerly node-webkit) appears to be what I was looking for.

    It allows you to access node.js modules directly from the DOM, so you can write to local files using javascript inline with the rest of your code. It also allows you to package the app together so that you can deploy it as an executable.

    It also appears to have an active community and numerous apps from developers, so it is production ready.