Yen-Ju Chen wrote:
I am looking for a notifier for system-wide file change.
I found Linux has inotify and BSD has kqueue.
Unfortunately, kqueue is broken on mac.
And there is a libevent to bypass the bug of kqueue on mac.
Although libevent is portable, it seems not designed to deal with file changes.
Does anyone have ideas about how to write or port a portable notifier
for file change ?
The one used in beagle seems only support inotify.
There is a FAM from SGI (http://oss.sgi.com/projects/fam/news.html),
but it is dead for 2 years.
It's not really dead. The thing about FAM is that it was very very very
stable by the time SGI released it. It's packaged for nearly every OS &
filesystem, and it can use inotify and half a dozen other methods where
they are available. It's essentially a file modification abstraction
layer, and it works VERY well.
Why reinvent the wheel? The project isn't dead so much as extremely
stable. It would be nice to see more development on it, but there's
really nothing wrong with it.