How does one completely empty (or delete all files in) a filesystem?
Is there no 1 line solution like localStorage (localStorage.clear()
)? Or am I missing something really, really obvious?
Apparently, I wasn't very clear. I'm referring to the HTML5 Filesystem API. http://www.html5rocks.com/en/tutorials/file/filesystem/
2016 Update: The File API "Directories and System" effort has been abandoned and what little support had made it into browsers is being dropped. The original File API is still valid, but the stuff providing an entire file area on the user's system has been abandoned.
It looks like DirectoryEntry#removeRecursively
does that. It says you can't remove the root of a file system, but you can loop through the entries in the root and remove them recursively (or just always work with a subdirectory of the root, thereby letting you remove that with a one-liner).
Not a one line solution but you can always go to
chrome://settings/cookies
and remove the file system from the origin of your choice
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With