file system notifications

Flavio Castelli micron at bglug.it
Fri Jun 1 14:08:25 UTC 2007


Hello to all, I develop an open-source desktop searching program called 
Strigi. Since actually the program supports file system notifications only 
under Linux (using inotify), I would like to add this feature also to freeBSD 
users.
I looked at kqueue and I played with it a bit, but unfortunately I discovered 
it isn't enough for me.

That's what I have to do: watch a set of directories and get notifications for 
some kind of event that happens into these directories.
The main problems with kqueue are:
- I have to open tons of file descriptors
- struct kevent doesn't tell event's main character (the file/dir that has 
been created/modified/deleted/...)

Searching around I discovered that darwin has fsevents (a device used also by 
Spotlight), but it isn't available under freeBSD (am I right?). You can see 
its sources here [1] and here [2].

So, what can I use for monitoring file system events under freeBSD?

Thanks in adance
        Flavio


[1] http://fxr.watson.org/fxr/source/bsd/sys/fsevents.h?v=DARWIN8
[2] http://fxr.watson.org/fxr/source/bsd/vfs/vfs_fsevents.c?v=DARWIN8
-- 
|§ micron<- ICQ #118796665
|§ GPG Key:
|§  ~ Keyserver: pgp.mit.edu
|§  ~ KeyID: 6D632BED

~ "Progress is merely a realisation of utopias" ~


More information about the freebsd-fs mailing list