Re: Spotlight Importer
Re: Spotlight Importer
- Subject: Re: Spotlight Importer
- From: Quincey Morris <email@hidden>
- Date: Tue, 26 Feb 2008 00:45:24 -0800
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