Re: How to best store references to disk items, not using paths?
Re: How to best store references to disk items, not using paths?
- Subject: Re: How to best store references to disk items, not using paths?
- From: Dave Camp <email@hidden>
- Date: Fri, 13 Mar 2009 07:57:28 -0700
On Mar 13, 2009, at 5:35 AM, Thomas Tempelmann wrote:
On Thu, Mar 12, 2009 at 23:03, Chris Suter <email@hidden> wrote:
It looks like you can use PBCatalogSearchSync instead which isn't
deprecated. You want to be searching for the node ID. Remember, the
node ID doesn't uniquely identify a file, you need to also record
which file system the file is on.
The way the Catalog search is usually implement, this won't be
efficient at all, though:
The Catalog Search on a HFS(+) volume is working like this: It
performs a flat search over the catalog file, looking at every entry
and matching it up with the search criteria.
To make a FileID lookup an instant response, the cat search code would
have to special-case this single ID lookup, and I doubt that any FS
implementation does do that.
I'm a bit rusty on my HFS internals, but I seem to remember there are
cases where HFS will create a thread record for a CNID, in which case
the lookup would be almost instantaneous (i.e. it could resolve the
file going down the tree instead of scanning all the leaf nodes).
However, I don't seem to recall what triggered their creation (or if
they are created all the time these days). Perhaps someone can
enlighten us on that...
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden