Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Spotlight Importer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spotlight Importer




On Feb 26, 2008, at 00:16, Gerriet M. Denkmann wrote:

I have an application (10.4.11) which creates simple text files (utf-8 or utf-16).
When I store some document as "myNewFile" then Spotlight does know nothing about it's content.
But when I store the same file as "myNewFile.txt" then all is fine.


Is there a way to tell Spotlight to treat all files with NSFileHFSCreatorCode = 'MyAp' as if it had a ".txt" file extention?
Or: if NSFileHFSCreatorCode = 'MyAp' then treat it as public.plain- text (unless the file extention says otherwise).

Your file is going to need a application-defined UTI, which is defined in the app's info.plist file. That private UTI definition can also equate your private HFS creator code to the private UTI, but there's not much point in using that mechanism if you're saving the file with a UTI anyway. I'm guessing that spotlight will happily index a file with UTI public.plain-text.something-your-application-defined as a text file, but I don't know for sure.


Have you visited http://developer.apple.com/macosx/uniformtypeidentifiers.html already?

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Spotlight Importer (From: "Gerriet M. Denkmann" <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.