Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy FS #197

Closed
wants to merge 4 commits into from
Closed

Proxy FS #197

wants to merge 4 commits into from

Conversation

billiegoose
Copy link
Contributor

@billiegoose billiegoose commented Aug 23, 2017

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:

  • before/after read
  • before/after write
  • before/after create
  • before/after delete
  • before/after mkdir
  • before/after rmdir

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)

@billiegoose
Copy link
Contributor Author

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.

@billiegoose
Copy link
Contributor Author

Currently I have only wrapped readFileSync and writeFileSync. However I did make a lovely factory to test that all the pass-through functionality works.

@emeryberger
Copy link
Collaborator

Looks like this should be closed, correct?

@emeryberger
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New backend proposal: ProxyFS
2 participants