-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for recursive symlink following #132
Comments
This intentionally is not possible - os watchers (inotify, FSEvents) report events using canonical paths. If a symlink to other directory tree was added then notify would start to report events coming from other tree that was not explicitly watched by a user, which may create confusion. The current approach is to leave decision whether to watch symlinked tree or not to the user. Unrelated - from you snippet I learned there's a |
There's no type of configuration for this though correct? The user would have to attach watchers to any symlinks added into the tree.
As far as I could tell, from my brief experiment, it actually reported paths relative to the root watched directory |
Unfortunately no, current API was built with minimal configuration in mind, in fact there's no configuration at all. Right now we regret a bit this decision and we were previously planning to introduce (backward-compatible) v2 API with actual configuration.
I'm speaking off the top of my head, so I might be wrong. The relative paths might be true for inotify, but not for FSEvents and ReadDirChangesW (macOS / windows). |
If I add a symlink to a directory it would be awesome if it's tree could be watched as well.
I suspect this might be difficult to support in a cross compatible way without additional work. For the non-recursive linux inotify, it looks like it's just the addition of resolving the symlink in here:
notify/node.go
Lines 82 to 87 in 7e20c15
(would end up looking something like this)
The text was updated successfully, but these errors were encountered: