Re: Retrieving Uniform Type Identifiers
Re: Retrieving Uniform Type Identifiers
- Subject: Re: Retrieving Uniform Type Identifiers
- From: Ken Thomases <email@hidden>
- Date: Mon, 26 Jul 2010 17:54:26 -0500
On Jul 26, 2010, at 5:20 PM, Dave DeLong wrote:
> I have the string "com.apple.iwork.*", and I need to expand that into any UTIs that match the string. In this case, it'd be:
>
> (
> "com.apple.iwork.pages.pages",
> "com.apple.iwork.keynote.key",
> "com.apple.iwork.numbers.numbers"
> )
>
> The root question I have is: How can I retrieve a list of all known UTIs?
I don't have a direct answer for you. It may not be possible.
Depending on what you're trying to do, you may be able to actually use the wildcard version. For example, the shell command:
mdfind 'kMDItemContentType == "com.apple.iwork.*"'
works, as should the comparable NSMetadataQuery-based code.
There's also this:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump
which includes the info you're looking for.
Cheers,
Ken
_______________________________________________
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