[Mono-osx] FileSystemWatcher workaround for Mac OS X
andreas.faerber at web.de
Sun Oct 26 06:39:25 EDT 2008
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
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
> 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.
More information about the Mono-osx