
kqueue is the "low level" interface, but requires that you handle all file system events as they happen, and fast. There is a higher level interface called fsevents (with accompanying daemon fseventsd) which allows you a more calm way to read the file system events. http://developer.apple.com/mac/library/documentation/Darwin/Conceptual/FSEve... I think launchd just happens to have an integration to kqueue or fseventsd, I'm not sure launching a program every time a file changes would be the best thing :-) -Ross On Dec 4, 2009, at 11:08 AM, David Leimbach wrote:
d
On Thu, Dec 3, 2009 at 7:55 PM, Gregory Collins
wrote: Conal Elliott
writes: I'd like to make some FRPish toys that keep files updated to have functional relationships with other files. hinotify looks like just the sort of underlying magic I could use for efficient implementation on linux. Is there any support for mac os x? Could support be either added to hinotify or maybe inotify and a mac-friendly library be abstracted into a common Haskell interface? I'm fine with an imperative interface, since I can abstract into a functional library, which I guess would be a sort of persistent simplified FRP.
On Mac & BSD you have to use kqueue, and on Windows it's ReadDirectoryChangesW. A platform-agnostic Haskell library for detecting filesystem change notifications is something that I would really appreciate!
launchd does everything on mac os x, like literally everything. My mother said if I can't say something good about someone or something then don't say anything at all, and in this case, I'm taking her advice on what I think about launchd, however if you click the link below you might get an idea of how that works on Mac OS X.
http://stackoverflow.com/questions/1515730/is-there-a-command-like-watch-or-...
Dave
G -- Gregory Collins
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe