Re: Identifying directory changes with kqueue/keven
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Sep 19, 2007, at 12:04 PM, darwin-dev-request@lists.apple.com wrote: I'm trying to watch a directory for changes, so the couple kqueue/ kevent could do the job (aside from the Carbon FNSubscribe). Only problem is that, like FNSubscribe, kqueue/kevent can't tell what file in the directory changed (or maybe I missed something ?). No, that's the normal implementation. The alternatives are all worse. There's also the issue of "what changes actually matter"? = Mike _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... So, is there any simple way to identify the changed file, or do I have to keep track of all files in the directory, and compare this to the directory every time a change occurs ? This could be quite expensive and handling events like file renaming would be a real pain... The system has to be able to make forward progress in the case where a client isn't keeping up with notifications, so for a given watched object it's reasonable to have it report "this changed", but committing to remembering everything that has changed for an arbitrary (and potentially long) period of time is not practical. This email sent to site_archiver@lists.apple.com
participants (1)
-
Michael Smith