-
Notifications
You must be signed in to change notification settings - Fork 7.3k
fs.watch blocks folder (windows 8) #3963
Comments
That's a limitation of the Windows file watcher API. Use |
I wish we would be able to work around this, but unfortunately we can't. |
System.IO.FileSystemWatcher in .NET uses the same API (ReadDirectoryChangesW) and it works for given scenario. Could you elaborate please why is that impossible? |
ReadDirectoryChangesW (apparently) locks the parent folder of the folder being watched. You can even replicate this with windows explorer.
I don't believe you. Convince me by sharing your test case :-) |
Windows explorer actually works fine on Windows 7-8, opened sub-folder explorer just updates the path. Though I can replicate what you're talking about on XP. Regarding FileSystemWatcher, you're right, I tried to set up some basic test and realised that it does also block parent folder of the folder being watched. Thanks for your time! |
On windows 8 running following code
and trying to rename C:/Test/Sub causes error:
Folder In Use The action can't be completed because the folder or a file in it is open in another program
The text was updated successfully, but these errors were encountered: