[Mono-list] FileSystemWatcher does not fire on Mac OS X

Stifu stifu at free.fr
Wed Nov 16 12:16:02 EST 2011


I suggest you file a bug report (http://bugzilla.xamarin.com/) with a reduced
standalone test case attached.


ilber wrote:
> 
> I wrote a simple console app with mono develop and i foud that the problem
> is with the property IncludeSubdirectories.
> The FileSystemWatcher fire only on the parent dir and not in the
> subdirectories :).
> 
> I'm the only one that I have this error?
> 
> From: mono-list-bounces at .ximian [mailto:mono-list-bounces at .ximian] On
> Behalf Of Ilber Ibrahimi
> Sent: mercoledì 16 novembre 2011 17:02
> To: mono-list at .ximian
> Subject: [Mono-list] FileSystemWatcher does not fire on Mac OS X
> 
> Hi you all,
> I have a little application that monitor changes on a specified folder. In
> Windows everything works fine but when I try under Mac OS X Snow Leopard
> the FileSystemWatcher does not fire.
> This is the definition of the watchers:
> 
> FileSystemWatcher  _Watcher = new
> FileSystemWatcher(Program._FBServer.FreeBoxFolder);
> _Watcher.InternalBufferSize = 5000000;
> _Watcher.IncludeSubdirectories = true;
> _Watcher.Created += new FileSystemEventHandler(OnChanged);
> _Watcher.Renamed += new RenamedEventHandler(OnRenamed);
> _Watcher.Changed += new FileSystemEventHandler(OnChanged);
> _Watcher.Deleted += new FileSystemEventHandler(OnChanged);
> _Watcher.EnableRaisingEvents = true;
> 
> Funcitons:
> 
> private void OnChanged(object source, FileSystemEventArgs e)
> {
>      // Specify what is done when a file is changed, created, or deleted.
>      Console.WriteLine("File: " + e.FullPath + " " + e.ChangeType);
> }
> 
> private void OnRenamed(object source, RenamedEventArgs e)
> {
>     // Specify what is done when a file is renamed.
>     Console.WriteLine("File: {0} renamed to {1}", e.OldFullPath,
> e.FullPath);
> }
> 
> 
> Can anyone help me please?
> 
> Thanks
> 
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at .ximian
> http://lists.ximian.com/mailman/listinfo/mono-list
> 


--
View this message in context: http://mono.1490590.n4.nabble.com/FileSystemWatcher-does-not-fire-on-Mac-OS-X-tp4076861p4077121.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list