Closed dsl400 closed 1 year ago
@dsl400 - BrowserFS emulates the NodeJS fs
interface. As long as you've initialized your filesystems:
https://jvilk.com/browserfs/2.0.0-beta/index.html
You can use a majority of the commands listed here: https://nodejs.org/api/fs.html
Also, there are a ton of examples online of how to use the NodeJS FileSystem API's. For some of the more basic commands, W3Schools has a good reference: https://www.w3schools.com/nodejs/nodejs_filesystem.asp
@jcoutch: Sorry to say that your advice did not work for me, and the documentation really feels like an afterthought. Maybe I did not initialize the filesystem correctly, but existsSync() does not seem to work for files created during a previous session and saved with the IndexedDB ...
@loic-meister-guild exists/existsSync were not implemented until recently with #334.
As for the question, jcoutch's advice should be applicable.
Some examples on how to do basic stuff like get a list of files and directories and perform actions like filter and sort mite help.