Mailing Lists: Apple Mailing Lists

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

Spotlight Importer / NSMetadataQuery question...



We are currently working on a Spotlight importer for our custom data format.

Out file references another file on the file system, so we want to get the metadata of the referenced file to include (at least part of) in our returned metadata. So the following questions:

1.) Is there any API to directly call an importer for a specific file to get its metadata.

2.) If no to #1 (which I don't believe is the right way to go), we are creating a NSMetadataQuery to get the public metadata for the specific file. We are creating an NSPredicate where

kMDItemPath == the/path/to/the/referenced/file

However this query always returns 0 results. However if we create a query where

kMDItemDisplayName  == NameOfReferencedFile

we get (at least) one result, and in that result the kMDItemPath returns the full & correct path to the file.

Anyone know why the query where "kMDItemPath == the/path/to/the/ referenced/file" is unable to locate the file?

(This testing is all done in a standalone application, not in an importer).

Is this a bug, or am I off base somewhere?

Thanks.

Pat Homelvig
email@hidden
303-906-6104

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-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.