3 ms·
Javascript can write to a file.. see jsshell, node and a number of other runtimes. However, you do not want browsers to have unfettered filesystem access. The
by tracker1 9y ago
Javascript can write to a file.. see jsshell, node and a number of other runtimes. However, you do not want browsers to have unfettered filesystem access. The language is perfectly able. You could possibly write an extension to do what you want.
- 8bitsrule 9y agoI'm not talking about 'unfettered'. It would be great for me to -natively- let users write-to/modify text-only files in the same folder as the parent file. I fail to understand why this has to be hard, dangerous (it'd certainly be useful ... to them AND to me). Real languages have a WRITE command. FileReader was a big step forward that took forever to arrive. Where's FileWriter?
- tracker1 9y agoHere's more info... https://stackoverflow.com/a/2158074 https://stackoverflow.com/a/2158074
- 8bitsrule 9y agoThanks for that, but I'm talking about user-initiated writing to separate, editable, plaintext, named files in the same local folder as the parent HTML/JS source. NO web interaction needed or desired, no other knowledge of or access to filesystem desired. For example, browser as IDE. Or database editor/searcher. Powered by JS.
- tracker1 8y agoThe only way you'll get that is to use something like electron that gives you access to node resources. The browser is sandboxed for a reason, and what you're talking about would be a violation of that. The good thing is Electron apps are incredibly portable.