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

Single file support for inotify #22

Merged
merged 3 commits into from
Jul 12, 2015
Merged

Conversation

Yuhta
Copy link
Contributor

@Yuhta Yuhta commented Jul 11, 2015

Fix #16

@passcod
Copy link
Member

passcod commented Jul 11, 2015

Great work! Is inotify the only one that needs this, or do the others (polling) also need patching up?

Add yourself to the authors array in the Cargo.toml :)

@maurizi Not sure if your work on the Windows implementation supports single file watching, is it possible, harder, easy ? Just to let you know we're apparently going to support that now.

@Yuhta
Copy link
Contributor Author

Yuhta commented Jul 11, 2015

Patched and added PollWatcher; I don't have the environment to test FsEventWatcher but some one else can easily add it.

@maurizi
Copy link
Contributor

maurizi commented Jul 11, 2015

@passcod Windows only really has a notion of watching directories, so this will be harder on Windows, since we'll have to add a layer above this that filters out events not for that file. Since it looks like PollWatcher will need that as well, it might be a good idea to implement it generically.

@passcod
Copy link
Member

passcod commented Jul 12, 2015

I'm going to merge this to fix #16. FS watchers in general seem to only support watching folders, with exceptions.

So we'll have to figure an internal API, perhaps with traits, so a backend could:

  • implement a FileWatcher to watch individual files, so we'd have to recurse to watch everything, or
  • implement a DirWatcher to watch individual folders, so we'd have to recurse to watch subfolders, or
  • implement a RecursiveDirWatcher to watch everything, or
  • any combination of the above

and then Notify itself would take care of wrangling each backend to provide the same public API.

passcod added a commit that referenced this pull request Jul 12, 2015
Single file support for inotify and poll
@passcod passcod merged commit 2c80db4 into notify-rs:master Jul 12, 2015
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

Successfully merging this pull request may close these issues.

None yet

3 participants