Re: How to monitor a directory in FreeBSD?

From: meator <meator.dev_at_gmail.com>
Date: Sat, 13 Aug 2022 19:15:19 UTC
On 8/13/22 18:51, Craig Leres wrote:
> 
> The way I've done it is is to use EVFILT_VNODE/NOTE_WRITE to tell me 
> when the directory has changed and then roll my own opendir()/readdir() 
> code to detect what (if anything) was added or deleted.

This looks like the most natural solution, but I would have to keep and 
remember the state to be able to tell the difference between the current 
state and the state before. This would add complexity to the code, but 
it shouldn't be that hard to implement in my use case. Thanks!