Open bgins opened 2 years ago
A couple of rough ideas for how we might implement this feature:
Note that this would be a first quick implementation with a focus on getting it working and establishing a good interface. A subsequent implementation could set up PubSub with the server over a websockets channel to remove the internal polling.
Summary
Problem
Developers need to poll the filesystem to detect changes.
Impact
Extra work and complexity for developers.
Solution
Add an interface to subscribe to any change to WNFS. The interface should notify developers when a change occurs locally and remotely.
Detail
It's currently possible to add a callback to the WNFS publish hooks, which are called when a change is made locally. We can likely use the existing work as a starting point or hook into it.