Date: Sun, 03 Jun 2007 01:46:24 +0300 From: Cristian KLEIN <cristi@net.utcluj.ro> To: Flavio Castelli <micron@bglug.it> Cc: freebsd-fs@freebsd.org Subject: Re: file system notifications Message-ID: <4661F340.6080009@net.utcluj.ro> In-Reply-To: <200706011557.13769.micron@bglug.it> References: <200706011557.13769.micron@bglug.it>
next in thread | previous in thread | raw e-mail | index | archive | help
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 | +-------------------------------------+
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4661F340.6080009>