-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Implement filesystem watching via ReadDirectoryChangesW #952
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
Conversation
Thanks for the feedback everybody. I'll make it a priority to fix these. Keep up the testing! |
@duke7553 Just a curiosity: There is the FileSystemWatcher class which I think is supported in UWP |
@gave92 Personally, I'm trying to keep as much core functionality as possible outside the Full Trust component. This is because FullTrust components are not supported in Windows 10X. |
I meant: I think that FileSystemWatcher is supported in UWP. FileSystemWatcher is part of netstandard 2.0 and uwp supports that. |
@gave92 Good thought. Unfortunately, .NET Classes are unable to access brokered filesystem locations which WinRT apps use, which means we have to do it the native way. |
@duke7553 thanks for the clarification. I thought that the |
It is clearly because the method is fired twice, but how to prevent that, IDK |
@duke7553 I still have to review the code but I had similar issue with the recycle bin functionality: multiple filesystem update events where firing at the same time and I was ending with duplicate items. I solved it using a semaphore so the refresh function can only be entered after the previous call has ended. |
@duke7553 Sometimes displayed(after creation) 4 or more folders/files instead of 1. In my testing this bug is not appears when refreshing items. |
@tsvietOK In my testing, it was almost like refreshing multiple times didn't properly cancel the previous watcher. |
Refreshing causes the next item add/removal action to be duplicated. |
@duke7553 very stupid suggestion: you are not |
@yaichenbaum @tsvietOK @gave92 This is ready for review. If at all possible, we should review this one quickly before the next release. |
|
@duke7553 refreshing + renaming still has some issues for me:
|
This requires extensive testing as it may have introduced a few bugs.