-
Notifications
You must be signed in to change notification settings - Fork 481
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
Is there some way to watch directories? #758
Comments
Actually, internally the Listen library does watch directories (except on BSD) - but changes to directories result in scanning them (for fields). Directories aren't too useful to treat as "content" - you're better of using actual files one way or another. In truth, since Listen tries to be as portable as possible, it barely even watches files properly (lots of workarounds to make that happen). If you're curious, check out https://github.com/guard/listen - there's even a LISTEN_GEM_DEBUGGING=2 environment variable that shows the actual events happening and how they are handled. What's your use case? Maybe there's some compromise possible. And what OS is this for? |
Hi- This is on OSX. Have used Listen.to to watch for file changes, it's fantastic :) |
I try to instead at least have a file that lists the directories. You could try using the rb-fsevent gem directly. |
I added a feature request here: guard/listen#313 If this is still relevant for you, you can watch that issue there - I don't think there will be changes in Guard for this, since Guard doesn't distinguish between directories and files. |
Setup some code that uses dir name to take action... not the files within them.
Is there some way to trigger on dir changes? Can't seem to make it work, even with--
Thanks!
The text was updated successfully, but these errors were encountered: