6 ms·
Just a matter of time before Chrome pushes another JS API like File System API and you can actually defrag your drive from the browser.
by r1chardnl 2y ago
Just a matter of time before Chrome pushes another JS API like File System API and you can actually defrag your drive from the browser.
- v_b 2y agoShould already work today with your cloud storage I think
- ossobuco 2y agoIt's already there: https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system https://developer.mozilla.org/en-US/docs/Web/API/File_System...
- HeatrayEnjoyer 2y agoWhy do APIs like this even exist? There's no legitimate reason for an HTML webpage to need this, it's just creating more attack surface for bad actors.
- zamadatix 2y agoThe File System API is a JavaScript API, not an HTML one, so it helps to think about it from that light (programs, not documents). The API allows tools such as photo editors, file converters, code editors, and the like to be given access to a set of files they can work on directly rather than needing to import and export from the browser on every change. If the attack surface is too much for a use case it can be globally denied by default in every major browser so you won't even get prompted.
- HeatrayEnjoyer 2y agoJavaScript is just a feature accessory for HTML. There's no meaningful difference.
- zamadatix 2y agoFor whatever your preference in slicing that up is you can carry the "programs, not documents" reasons along.
- HeatrayEnjoyer 2y agoRight, but programs are programs. Browsers are for webpages. If we want a program we run an .exe
- nox101 2y agoThe page needs permission. That permission step is similar to the act of downloading a native app. Except for the fact that the broswer gives even less access to your system than a native app so it's safer than a native app. (at least on desktop) That file system API is super useful for cloud based IDEs as just one example
- miquong 2y agoMicrosoft has an elaborate VS Code demo app that uses this API. Click "Open Folder" to see the API in action): https://vscode.dev https://vscode.dev
- zamadatix 2y agoThey say "like" this one because it only provides file level interaction, not disk level interaction.
- jeroenhd 2y agoIf you know the right identifiers, you should be able to use WebUSB to access a flash drive/external hard drive. Combined with C-to-WASM compilers and Linux driver code, I'm sure you can defragment from the browser alone. Or you can hook this mechanism into one of the WASM x64 emulators and attach the drive directly to a copy of MS-DOS or Windows 98 running in the browser.