Intercepting inotify watches
Munter opened this issue · 0 comments
I'm working on a compiling proxy file system for frontend assets. The typical workflow for frontend developers involves setting up file watchers to trigger live reloading of browsers when contents of files are updated.
Watches work correctly against the fuse mount, but I have no way to intercept the setup or teardown of these watchers. In the ideal case I'd like to completely intercept the watch call, set up my own watcher against the source directory and trigger the fuse file watcher callback when needed. I would hope that I could cut the amount of inotify watchers in half that way. Also I would prefer to set up watchers on demand, given the actual usage pattern, instead of needing the developer to manually preconfigure what the fuse proxy will need to set up watchers for.
What do I need to do in order to intercept these watcher interactions with my fuse mount? I assume there might be some native bindings that have to be written, and I am willing to give that a go, but I am not even aware of what methods I would need to implement