Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EVFILT_VNODES?



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: http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.