Skip to content

fs-compatible module with the ability to mount other fs-compatible modules at specific locations

License

Notifications You must be signed in to change notification settings

papandreou/node-mountfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

fs-compatible module with the ability to mount other fs-compatible modules at specific locations

Resources

License

Stars

Watchers

Forks

Packages

No packages published