You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.
fsnotify looks well structured, but there is one thing which makes it not very useful at the moment: it's not possible to get the rename target, nor the raw notify events. I guess that this is to have a consistent interface across operating systems.
The problem with not telling me the rename target is that gedit (a text editor) actually doesn't modify the target file directly, but creates a new file and when it is complete replaces the target by renaming over it.
At the moment fsnotify outputs these events when I hit save:
Linux - Events are received for the directory you watch, so if you are not watching the target directory, you will only get the event coming out of the directory you are watching.
Man page for reference: http://linux.die.net/man/7/inotify
Now, you can watch individual files, but as far as I know, you can't get the destination location after a rename.
I am hesitant to expose the underlying inotify event, because it makes the API less-consistent across operating systems and also because I'm not sure you'd gain the functionality you seek anyway.
Now, it may be possible that I have misread the documents, or there is some other way of doing this that I have not thought of. If I have missed something that will provide the rename functionality, please let me know. I'd be more than happy to rectify the situation.
fsnotify looks well structured, but there is one thing which makes it not very useful at the moment: it's not possible to get the rename target, nor the raw notify events. I guess that this is to have a consistent interface across operating systems.
The problem with not telling me the rename target is that
gedit
(a text editor) actually doesn't modify the target file directly, but creates a new file and when it is complete replaces the target by renaming over it.At the moment fsnotify outputs these events when I hit save:
The end result being that I don't know what file was modified by the editor.
The text was updated successfully, but these errors were encountered: