npm.io
0.0.10 • Published 10 years ago

proxy-fs

Licence
MIT
Version
0.0.10
Deps
0
Vulns
0
Weekly
0
Stars
2

proxy-fs

A simple proxy filesystem.

NPM version Build Status Coverage Status

example

var mfs = new MemoryFileSystem({});
var pfs = new ProxyFileSystem(function (path) {
  if (/abc/.test(path)) {
    return {
      path: '/data/hello.js',
      fileSystem: mfs
    };
  }
});

mfs.mkdirpSync('/data');
mfs.writeFileSync('/data/hello.js', 'hello');
console.log(String(pfs.readFileSync('/data/abc.js')));
// > hello

License

MIT zswang

Keywords