[Mono-osx] An open letter to the OS X Mono group.

Louis R. Marascio louis at fitnr.com
Sat Apr 7 10:52:49 EDT 2007


Andreas Frber <andreas.faerber at web.de> wrote:
>The remaining problem then is: How do we handle wildcards? Currently  
>we have a 1:1 mapping of FileSystemWatchers to file descriptors. But  
>what if a user wants to monitor a directory with hundreds of files?  
>The commented out part of my test implementation shows that we are  
>limited to 255 open file descriptors in whole. According to my  
>reading this is what Linux software like inotify and the like handle  
>- but nothing comparable seems to be available for OS X except some  
>hacky ways of accessing the undocumented internals of Tiger's  
>Spotlight engine. And Finder's FSNotify seems to be an even worse way  
>of detecting changes. So kevent seems to be our best bet for now -  
>it's just the question of how to use it.

Actually, as I've poked further you seem to be right about the
directory vs file issue. vi must be doing something unique in how it
writes changes to disk such that they get caught by kevent when only the
directory has been opened.

As it stands now it doesn't work, so even if we make it work up to 255
monitored files that's an improvement. Ideally, Apple would make the
EVFILT_FS kevent filter available as a public API as this is clearly
Apple's scalable FS monitoring method.

Louis

-- 
Louis R. Marascio - www.fitnr.com
... fixed in the next release ...


More information about the Mono-osx mailing list