-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add FileSystemWatcher support #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Will give a more insightful look later tonight.
@@ -7,6 +7,7 @@ | |||
using System.IO; | |||
using System.Linq; | |||
using Zio.FileSystems; | |||
using Zio.Watcher; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to avoid a new namespace actually and the dependencies that it brings (Zio -> Zio.Watcher, Zio.FileSystems -> Zio.Watcher...etc.)
Could you move:
- the watcher interfaces (and related events) to the top root namespace along the
IFileSystem
. - the helper implementations (aggregate, wrap) to FileSystems
Okay, I fixed all my issues with it. |
_globalLock = new FileSystemNodeReadWriteLock(); | ||
_dispatcher = new FileSystemEventDispatcher<Watcher>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we delay the creation of a _dispatcher only if we are actually using the watch API? I would prefer if we could avoid the cost of having a thread created...etc.
Were there any other issues with this? |
That's all good, sorry I'm on a business trip so a bit less available this week. Will take a bit more time next week to check things more deeply and package a new version, thanks for this PR! |
Current progress so far, not quite ready to merge. Still needs some documentation and unit tests.