3 ms·
The HTML5 standard has included the ability to read files for longer than ECMA-262 has had modules and classes (which has already been quite some time—those app
by cxr 5y ago
The HTML5 standard has included the ability to read files for longer than ECMA-262 has had modules and classes (which has already been quite some time—those appeared in ES2015).
Writing files is a different matter, but you can easily prompt the user with the browser-native download manager when your app has finished processing the input and the user indicates they want to save. This, too, has been available for a long time.
The Chrome team has introduced a new, experimental file access API, but it's not strictly necessary for any of this and probably gives up too much power[1]. Before that, there were the DOM Load and Save APIs (2002)[2], which never got implemented.
The future would look less grim if they chose instead to do something like reboot Google Gears, providing a supplemental component that implemented e.g. the remoteStorage protocol that just happened to use your local disk for its backing store—but in a way that's completely transparent to the web app, which shouldn't even be concerned with things like that. It would also translate much better for mobile devices, too, which may or may not have any notion of a desktop-like file system exposed to the user.
1. https://news.ycombinator.com/item?id=30766276 https://news.ycombinator.com/item?id=30766276
2. http://www.w3.org/TR/DOM-Level-3-ASLS http://www.w3.org/TR/DOM-Level-3-ASLS