• 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: [UTI] Anyway to retrieve the UTI of a file without having to use a FSRef?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >[UTI] Anyway to retrieve the UTI of a file without having to use a FSRef? (From: Iceberg-Dev <email@hidden>)
 >Re: [UTI] Anyway to retrieve the UTI of a file without having to use a FSRef? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: [UTI] Anyway to retrieve the UTI of a file without having to use a FSRef?
  • Next by Date: Re: NSFetchedResultController bug?
  • Previous by thread: Re: [UTI] Anyway to retrieve the UTI of a file without having to use a FSRef?
  • Next by thread: Custom bitmap representation
  • Index(es):
    • Date
    • Thread