• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Identifying directory changes with kqueue/keven
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Identifying directory changes with kqueue/keven


  • Subject: Re: Identifying directory changes with kqueue/keven
  • From: Michael Smith <email@hidden>
  • Date: Thu, 20 Sep 2007 00:56:16 -0700


On Sep 19, 2007, at 12:04 PM, email@hidden 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.

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 alternatives are all worse.

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.

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      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Posix shared memory - permission problems?
  • Next by Date: Re: Posix shared memory - permission problems?
  • Previous by thread: Re: Identifying directory changes with kqueue/kevent
  • Next by thread: Thread Priority?
  • Index(es):
    • Date
    • Thread