Abstracts file system and os functionalities

Usage no npm install needed!

<script type="module">
  import cofounder from '';


💾 cofounder

build status npm version npm download dependencies coverage status license

What is the CoFounder?

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.

Why CoFounder?

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,

Quick start

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;'ls');

List of methods

  • fs.cp
  • fs.cpP
  • fs.glob
  • fs.lstat
  • fs.mkdir
  • fs.mkdirP
  • fs.mvP
  • fs.readdir
  • fs.readFile
  • fs.rm
  • fs.rmdir
  • fs.rmdirP
  • fs.rmP
  • fs.writeFile
  • fs.writeFileP
  • json.loadFile
  • json.saveFile

Todo List

  • Buffered glob copy
  • Move and rename
  • Virtual file system implementation

See GitHub Projects for more.



Apache 2.0, for further details, please see LICENSE file



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.

To Support

Visit my patreon profile at