Closed billiegoose closed 1 year ago
DON'T MERGE IT YET!!!
Feedback on how to achieve my goals with less typing would be appreciated. I tried some simpler ways than what I'm doing, but I couldn't get the type checker to like them.
Currently I have only wrapped readFileSync
and writeFileSync
. However I did make a lovely factory to test that all the pass-through functionality works.
Looks like this should be closed, correct?
I'm going to close this since it's been idle for years. Please feel free to post a comment and I can always re-open it.
or Middleware FS. or Hook FS. Or Instrument FS? I can be indecisive. Fixes #196
The goal is a backend that will proxy (wrap) any existing backend, while letting you the user hook into some of the internals. This will make it trivial to implement file-system "watching" behavior. Currently I'm planning these hooks:
I am also contemplating whether or not to add transform hooks. These would allow modifying the behavior of a file system by letting you transform the arguments and results. This is a much trickier feature. Having transform hooks would enable rapidly prototyping filesystems in user-space, with whatever pros and cons that brings. (Think of FUSE in Linux)