Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Mar 2015 08:37:34 -0500
From:      Guy Helmer <guy.helmer@gmail.com>
To:        "O'Connor, Daniel" <darius@dons.net.au>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: file system change notifications
Message-ID:  <5786089D-414D-485C-B675-35B5A62C5950@gmail.com>
In-Reply-To: <237A50A5-FAB7-4FC1-B8F1-0E40DCBF6137@dons.net.au>
References:  <C4BD68D4-0570-4731-AFA2-CDD4DD5490E5@westryn.net> <237A50A5-FAB7-4FC1-B8F1-0E40DCBF6137@dons.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 11, 2015, at 5:46 PM, O'Connor, Daniel <darius@dons.net.au> =
wrote:
>=20
>=20
>> On 12 Mar 2015, at 05:31, Kim Shrier <kim@westryn.net> wrote:
>> I have a project where I need to notice changes to files in a large =
directory tree.
>> I noticed that there was a project in GSOC 2010 to implement such a =
feature.
>>=20
>> https://wiki.freebsd.org/SOC2010IlyaPutsikau=20
>>=20
>> It appears that it was never completed.  Is it desirable to have this =
project
>> completed and added into FreeBSD.  Or, is there another way to get =
file
>> system change notifications?
>=20
> The 'standard' way is kqueue + masses of file descriptors.
>=20
> I am looking at using auditpipe(4) since you can register to be =
notified for all file modifications and you get a path.
>=20
> I wrote some test code at =
https://gist.github.com/DanielO/e36de242e79fed3fe4f7
>=20
> Ideally we could add an inotify() syscall although I think that is =
still suboptimal since you need to add a watch per directory so it can =
be relatively expensive to setup. That said working out what to do in =
the face of links and so on is tricky..

How are Darwin (OS X) fsevents implemented? It=E2=80=99s a been a handy =
interface for some of my work.

Guy




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5786089D-414D-485C-B675-35B5A62C5950>