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

Apply action to a directory #6

Open
claudiu-cristea opened this issue Feb 15, 2013 · 2 comments
Open

Apply action to a directory #6

claudiu-cristea opened this issue Feb 15, 2013 · 2 comments

Comments

@claudiu-cristea
Copy link

Can I use fsniper to act against a directory rather than a file? How?

@andrewyates
Copy link
Contributor

There's currently no clean way to do this. The inotify API only generates events for files, so fsniper would need to implement a layer on top of that to return directory events.

You can achieve the same effect right now by recursively watching a directory for events. The corresponding handler will be called any time a file in the directory changes. With that approach you may want to implement a lock or delay in the handler, because mass file updates will cause the handler to run many times in a short period of time.

@claudiu-cristea
Copy link
Author

Thank you. In fact I want to fix ownership & permissions to new created directories (not only files).

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