💾 cofounder
DEPRECATED in favor of hex. See https://github.com/eserozvataf/hex for details.
This project is designed to offer file system functionalities within an abstraction layer.
Plus, as a library, CoFounder is completely tree-shanking-friendly. Your favorite module bundler can easily inline the functionality you need with no extra configuration, instead of bundling the whole CoFounder package.
I like standartization in general concepts like file system access. I have several node.js projects and most of the time I try to keep my code design similar, portable and shareable for applicability to other scenerios. CoFounder is the one of the products that I have developed with this mindset.
Apart from any file system library it offers,
- scanDir method to enumerate files and filestats by directory,
- glob method to enumerate matching files,
- rm method to delete matching files,
- rmdir method to delete directories recursively,
- mkdir method to make directory recursively,
- writeFile method to ensures target directory is made first then writes content to file,
Pick an implementation of CoFounder listed below:
Then run npm install [implementation]
or yarn add [implementation]
to install CoFounder implementation and its dependencies into your project directory.
Let's assume cofounder-node
is our implementation,
To initialize a CoFounder instance:
import cofounder from 'cofounder-node';
// or const cofounder = require('cofounder-node').default;
cofounder.os.shell('ls');
- fs.cp
- fs.cpP
- fs.glob
- fs.lstat
- fs.mkdir
- fs.mkdirP
- fs.mv
- fs.mvP
- fs.readdir
- fs.readFile
- fs.rm
- fs.rmdir
- fs.rmdirP
- fs.rmP
- fs.writeFile
- fs.writeFileP
- json.loadFile
- json.saveFile
- os.shell
- Buffered glob copy
- Move and rename
- Virtual file system implementation
See GitHub Projects for more.
- node.js (https://nodejs.org/)
Apache 2.0, for further details, please see LICENSE file
See contributors.md
It is publicly open for any contribution. Bugfixes, new features and extra modules are welcome.
- To contribute to code: Fork the repo, push your changes to your fork, and submit a pull request.
- To report a bug: If something does not work, please report it using GitHub Issues.