file system notifications

Cristian KLEIN cristi at net.utcluj.ro
Sat Jun 2 22:46:32 UTC 2007


Flavio Castelli wrote:
> 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 am curious. Have you tried fam? As far as I know, fam was created so
that developers won't have to bother about the mechanism they should use
to get file notifications.

> 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


-- 
+-------------------------------------+
| Cristian KLEIN                      |
| Network Engineer                    |
| Communication Center                |
| Technical University of Cluj-Napoca |
+-------------------------------------+
| Tel: +40-264-401247, int. 247       |
| WWW: http://www.cc.utcluj.ro        |
+-------------------------------------+


More information about the freebsd-fs mailing list