fs-compatible module with the ability to mount other fs-compatible modules at specific locations
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test Fix operations with a fd as the first arg hitting the root fs. Aug 5, 2016
.editorconfig Add .editorconfig. Jul 23, 2016
.eslintignore
.eslintrc.js Add eslint. Jul 23, 2016
.gitignore Add Travis, NYC, Coveralls integration. Jul 23, 2016
.travis.yml Add Travis, NYC, Coveralls integration. Jul 23, 2016
LICENSE Initial commit, release 0.1.0. Nov 3, 2013
README.md
package.json 0.4.2 Aug 22, 2016

README.md

mountfs

Allows to mount an fs-module compatible module as you would mount a device on linux.

Usage

var fs = require('fs');
var mountFs = require('mountfs');

mountFs.patchInPlace();

// calling the patchInPlace method, will add two methods to the fs
// module; mount and unmount.

fs.mount('/home/john/mountPath', fileSystemToBeMounted);

// the variable fileSystemToBeMounted should be a fs-compatible
// implementation. It will transparently be mounted and all methods on
// fs will work as you expect.

fs.readFileSync('/home/john/mountPath/foobar.txt', 'utf-8');

fs.unmount('/home/john/mountPath');