emcrisostomo / fswatch

A cross-platform file change monitor with multiple backends: Apple OS X File System Events, *BSD kqueue, Solaris/Illumos File Events Notification, Linux inotify, Microsoft Windows and a stat()-based backend.
https://emcrisostomo.github.io/fswatch/
GNU General Public License v3.0
4.96k stars 327 forks source link

Symlink question: Is fswatch suppose to notify of linked file changes #317

Open abbaswasim opened 6 months ago

abbaswasim commented 6 months ago

I am struggling to make fswatch work in the following scenario. Curious if this is suppose to work or not.

I have two directories:

root/data/actual_files.*
root/links/actual_files.* -> ../data/actual_files.*

If I run fswatch like following, with or without the -L option it works fine. It can notify me of all the actual_files.* changes.

fswatch --monitor=fsevents_monitor -L root/data/

But if I run fswatch like the following, with or without the -L option it doesn't work. It doesn't matter if I am editing these files via the root/links/actual_files.* symlinks or straight in the root/data/actual_files.*.

fswatch --monitor=fsevents_monitor -L root/links/

PS: using the fsevents_monitor should tell I am on MacOs Ventura 13.6.1 (22G313)

abbaswasim commented 6 months ago

Further to this. I have also tried both poll_monitor and kqueue_monitor both don't work at all on my setup with the above simple test. i.e. Symlink or not it won't show updates