0.0.10 • Published 8 years ago

proxy-fs v0.0.10

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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