file system change notifications
Guy Helmer
guy.helmer at gmail.com
Thu Mar 12 13:37:53 UTC 2015
On Mar 11, 2015, at 5:46 PM, O'Connor, Daniel <darius at dons.net.au> wrote:
>
>
>> On 12 Mar 2015, at 05:31, Kim Shrier <kim at 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.
>>
>> https://wiki.freebsd.org/SOC2010IlyaPutsikau
>>
>> 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?
>
> The 'standard' way is kqueue + masses of file descriptors.
>
> I am looking at using auditpipe(4) since you can register to be notified for all file modifications and you get a path.
>
> I wrote some test code at https://gist.github.com/DanielO/e36de242e79fed3fe4f7
>
> 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’s a been a handy interface for some of my work.
Guy
More information about the freebsd-hackers
mailing list