Re: EVFILT_VNODES?
Re: EVFILT_VNODES?
- Subject: Re: EVFILT_VNODES?
- From: Mike Smith <email@hidden>
- Date: Tue, 24 May 2005 23:41:33 -0700
Can anyone tell me how it works? Or could anyone recommend an
efficient method for determining when a file in a given directory or
any of its subdirectories changes, for a potentially large number of
subdirectories?
As a general rule, there isn't one.
You're making a common mistake in associating "file" with "location".
File paths are indices used to locate files. There is no guarantee
that there
is exactly one index for a file, nor is there any way to efficiently
enumerate
all of the indices for a file. Once a file is open, there is a
direct relationship
between the descriptor and the vnode that does not require the existence
of an index; this is how you can delete open files.
This means that when a file is modified, there's no guarantee that you
know "where" the file may be looked up; nor where it was looked up by
whomever is modifying it; nor where the user "thinks" it is. These
may be
three different locations.
Spotlight makes a number of specific assumptions about the notifications
that it receives, and it is interested in a view of files that sounds
very different
from yours.
Without knowing a lot more about you application, I can't help you
much more;
perhaps you could describe what you're trying to achieve?
= 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