FileSystemWatcher under monophonic subdirectors

I have a problem. I wrote a wrapper on top FileSystemWatcherthat detects changes in the root folder and all its subfolders. Nothing unusual:

FileSystemWatcher watcher = new FileSystemWatcher ();
watcher.Path = this.Root;
watcher.IncludeSubdirectories = true;
watcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.LastAccess | NotifyFilters.DirectoryName | NotifyFilters.FileName;
watcher.Changed += new FileSystemEventHandler (watcher_Changed);
watcher.Deleted += new FileSystemEventHandler (watcher_Deleted);
watcher.Created += new FileSystemEventHandler (watcher_Created);
watcher.Renamed += new RenamedEventHandler (watcher_Renamed);
watcher.EnableRaisingEvents = true;

While in .NET under Windows it works like a charm. But when I ported the code to mono and ran the code under OSX, it only works correctly in the root folder.

The questions I noticed now are:

  • Events are not generated for operations inside folders that already exist as root when the observer starts

  • The paths I get through the property EventArgs.FullPathare incorrect (when I copy the file to path_to_root / some / more / subdirs / some.file, the path I get is just path_to_root / some.file).

( , ), (MonoDevelop , "" 4.0.0.0, , ), ... : https://bugzilla.xamarin.com/show_bug.cgi?id=5747

? , , , root...

!

+5
1

, Mono OS X. , : https://bugzilla.xamarin.com/show_bug.cgi?id=16259

KEventWatcher, , . , , , PostEvent. , . kevent , .

FileSystemWatcher, , Mono . , , , , .

, , - , , - , FileSystemWatcher .

+5

All Articles