• 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: Spotlight Importer / NSMetadataQuery question...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spotlight Importer / NSMetadataQuery question...


  • Subject: Re: Spotlight Importer / NSMetadataQuery question...
  • From: Vince DeMarco <email@hidden>
  • Date: Mon, 2 May 2005 10:23:55 -0700


On May 2, 2005, at 9:37 AM, Pat Homelvig wrote:

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 currently doesn't work if you know the path to the file use use the function


MD_EXPORT MDItemRef MDItemCreate(CFAllocatorRef allocator, CFStringRef path) MD_AVAIL;

to get the MDItemRef

Seems like you can't do the equivalent with the NSMetadata calls.


(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:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Spotlight Importer / NSMetadataQuery question... (From: Pat Homelvig <email@hidden>)

  • Prev by Date: Re: Creating a Cocoa Help Book
  • Next by Date: Re: 'fi' ligatures [solved]
  • Previous by thread: Spotlight Importer / NSMetadataQuery question...
  • Next by thread: Re: NSView scrolling (NSTextView)
  • Index(es):
    • Date
    • Thread