One issue I have is that I know next to nothing related to those system events. But I know for example that writing to a file is not instantaneous. That's why some editors write to temporary files and then move them. And the documentation of raw events is very sparse. Here is for example the documentation of the write event:
A WRITE
event is emitted whenever a file has been written to.
If this is emitted when the write ends I guess it's fine but there doesn't seem to be any event related to when a write starts. Does that mean that it's not possible to detect those. It would be weird to me, because it means there would be no way of preventing reading access to a file being modified? Or maybe you can try read them but the OS will make that fail, etc.
I have so many unknowns, and it's not like I could try those and figure it out for Linux, Mac and Windows since I only have Linux at my disposal anyway.
So maybe two concrete questions:
- If I keep using debounced events, will bad things happen if I lower the debounced duration to something like 0.1s? what are the concrete implications of that duration?
- If I want to use raw events instead, does someone know of a nice open source project doing this so that I could have a look at how they do it?