Skip to content
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

Using fswatch without recursion option fires for files in subdirectories #266

Open
beesperester opened this issue Jan 14, 2021 · 1 comment

Comments

@beesperester
Copy link

I am using this command to watch changes to my cwd for files ending in .py and for the sake of this example simply echoing the resulting file path. Since I am not providing the -r option I would expect that only files which are direct children of my cwd will be echoed, but it still will fire for .py files in subdirectories of my cwd.

OS: macOS 10.15.7

fswatch --exclude ".*" --include "\.py$" --verbose ./ | while read f ; do echo $f; done

@Feuermurmel
Copy link

Feuermurmel commented Jan 15, 2021

FYI, the manual states under 4.14 Recursive Scanning:

The semantics of the (--recursive, -r) option is: recursively scan subdirectories. However, implementations may silently add ‘if the monitor does not do so already’. Since each monitor uses a different API, its behaviour depends on that of the backing API, and it is monitor-specific.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants