Re: [UTI] Anyway to retrieve the UTI of a file without having to use a FSRef?
Re: [UTI] Anyway to retrieve the UTI of a file without having to use a FSRef?
- Subject: Re: [UTI] Anyway to retrieve the UTI of a file without having to use a FSRef?
- From: Ken Ferry <email@hidden>
- Date: Tue, 13 Oct 2009 15:35:50 -0700
On Mon, Oct 12, 2009 at 3:45 PM, Jens Alfke <email@hidden> wrote:
>
> On Oct 12, 2009, at 3:36 PM, Iceberg-Dev wrote:
>
> Wouldn't there be an API I didn't see in Foundation that lets you obtain
>> the type without having to convert, at least, a NSURL to a FSRef?
>>
>
> In 10.5 there were a bunch of mismatches between APIs like this, that
> required clients to convert between paths, URLs and FSRefs. This got cleaned
> up a lot in 10.6 because it introduces performance overhead. So it's likely
> that there's a CFURL-based version of this API in 10.6.
Yep, though I don't think there is anything (for this stuff) in CFURL that
isn't also in NSURL.
You want -[NSURL getResourceValue:forKey:error:] with
NSURLTypeIdentifierKey.
-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