[Mono-osx] FileSystemWatcher workaround for Mac OS X

Andreas Färber andreas.faerber at web.de
Sun Oct 26 06:39:25 EDT 2008


Hi,

Am 22.10.2008 um 06:27 schrieb Kevin Heeney:
> Attached is a FileSystemWatcher class that I wrote to use instead of  
> Mono's FileSystemWatcher in System.IO for Mac OS X (at least Tiger).  
> I have not tried, but I believe the FileSystemWatcher supplied with  
> mono may work with Leopard since Leopard adds a feature called  
> FSEvents.
>

Using FSEvents was a suggestion I once made. To my knowledge there is  
no such code in SVN yet.
Mono used to use the BSD-style kqueue instead (Tiger-compatible, but  
functionally limited).

> I noticed the bug posted on the Mono site, but the Priority was P5  
> (none), so I had to come up with an alternative.
>

The workaround suggested at the time was to use  
MONO_MANAGED_WATCHER=1, which activates an implementation similar to  
the one you described. I added the environment variable to the  
Info.plist file of my Cocoa app (LSEnvironment key), which worked okay  
for me and was easily distributable.

Thanks for pinging me on this though.

Andreas



More information about the Mono-osx mailing list