proxy-fs

0.0.10 • Public • Published

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

Package Sidebar

Install

npm i proxy-fs

Weekly Downloads

2

Version

0.0.10

License

MIT

Last publish

Collaborators

  • 2betop
  • zswang