Extensible and reactive file-system library that keeps it simple
:kiss:fs supplies a standard API for the most basic file-system operations: CRUD of modest sized text files and directories, as well as listening for changes to files and directories. If you're looking to build a folder tree visualizer or manager, or a tool for viewing and editing any text file in a directory tree, :kiss:fs is what you're looking for. For simplicity and supportability, we are keeping the focus narrow so that it can be widely implemented and extended over a wide range of data sources, such as local file systems, remote git APIs, cloud-based file systems, etc. For example, you can use it to run a rename script on an in memory directory for testing purposes and then run the same script on the directories requiring the change.
There is currently no support for meta-data (timestamps, permissions, etc.), binary content or data streams. So if you're writing a log viewer or an all-in-one file system manager, this may not be the right tool for you and we suggest you try vinyl.
Feedback, questions and contributions always welcome via issues.
usage code examples
how to build and test:
- clone the repository
- in the cloned folder, run
npm testto build and test the code in both nodejs and browser
how to debug (browser):
npm build:watchto start transpiling all source files to es5 whenever they change (CTR+c to exit)
- in a different window, run
npm startto run a development server that watches the es5 files and serves them to the browser
http://localhost:8080/webtest.bundleto run live tests that will update while you change the source code