- Notifications
You must be signed in to change notification settings - Fork10
Rewrite file system `fs` paths
License
NotificationsYou must be signed in to change notification settings
streamich/linkfs
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Redirects filesystem paths.
npm install --save linkfsimport{link}from'linkfs';import{fs}from'memfs';fs.writeFileSync('/foo','bar');constlfs=link(fs,['/foo2','/foo']);console.log(lfs.readFileSync('/foo2','utf8'));// bar
Returns a newfs-like object with redirected file paths.
fs is the sourcefs-like object.
rewrites is a 2-tuple or an array of 2-tuples, where each 2-tuplehas a form of[from, to].from is the new,virtual path; andtois an existing path in thefs filesystem.
constlfs=link(fs,['/foo','/bar']);
or
constlfs=link(fs,[['/foo1','/bar1'],['/foo2','/bar2'],['/foo3','/bar3'],]);
Unlicense - public domain.
About
Rewrite file system `fs` paths
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Contributors3
Uh oh!
There was an error while loading.Please reload this page.