Skip to content

Add FsEventWatcher Support. fix #7#13

Merged
passcod merged 8 commits intonotify-rs:masterfrom
andelf:fsevent-support
Jun 8, 2015
Merged

Add FsEventWatcher Support. fix #7#13
passcod merged 8 commits intonotify-rs:masterfrom
andelf:fsevent-support

Conversation

@andelf
Copy link
Contributor

@andelf andelf commented Jun 8, 2015

This is ispired by the original work of https://github.com/octplane/fsevent-rust .

Currently you can only call .watch() once, and .unwatch() left unimplemented.
Good news is that Drop works. :)

UPDATE: .watch() .unwatch() works.

r: #12 #7
@octplane

@andelf andelf changed the title Add FsEventWatcher Support. Add FsEventWatcher Support. fix #7 Jun 8, 2015
@passcod
Copy link
Member

passcod commented Jun 8, 2015

I'm going to leave this to @octplane to evaluate and decide if it's mergeable or if some of it should be split back to fsevent-rust.

I'd also like to have watch and unwatch working completely before merging, unless y'all think that's too much work.

@andelf
Copy link
Contributor Author

andelf commented Jun 8, 2015

:) done.

@andelf
Copy link
Contributor Author

andelf commented Jun 8, 2015

@octplane if some of this should be split back to fsevent-rust?

@octplane
Copy link
Contributor

octplane commented Jun 8, 2015

LGTM. I will probably later remove some code from here to avoid duplication with my binding, but is seems reasonable to merge as-is if it is working correctly :). Great job @andelf!

@octplane
Copy link
Contributor

octplane commented Jun 8, 2015

@andelf: yes ! your comment arrived while I was writing mine :)

@andelf
Copy link
Contributor Author

andelf commented Jun 8, 2015

@octplane @passcod
This PR can be merged and @octplane and I will fix the duplicated code betweent fsevent-rust and rsnotify. ;)
The API will be compatiable.

BTW, what's the suitable behavior of after unwatch() all paths in a Watcher? Stop the Watcher or triger an error?

@passcod
Copy link
Member

passcod commented Jun 8, 2015

Leave the Watcher open for further watch() calls. If it's best to spin down the inner implementation or somesuch, do that (and spin it back up on a .watch()), but as long as it's not Dropped I would expect to be able to use it.

@passcod
Copy link
Member

passcod commented Jun 8, 2015

I'll probably merge in either a few hours, or tomorrow. Thanks both for the great work!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should say new_fsevent().

@passcod
Copy link
Member

passcod commented Jun 8, 2015

Comments in the code are minor style nitpicks, ignore them; I'll fix in the merge.

passcod added a commit that referenced this pull request Jun 8, 2015
Add FSEvent support
Fix #7
Also see #12
@passcod passcod merged commit 32ff762 into notify-rs:master Jun 8, 2015
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be a Result<(), String>

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.

3 participants