• 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 Example
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UTI Example


  • Subject: Re: UTI Example
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Fri, 22 Aug 2008 22:55:54 -0700


On Aug 22, 2008, at 10:42 PM, Adam Thorsen wrote:

Are there any examples of using the UTI API to determine the UTI given a path to a file?

On 10.4 and later, use LSCopyItemAttribute:

FSRef fileRef;
/* assuming valid fileRef */
CFStringRef theUTI;
LSCopyItemAttribute(&fileRef, kLSRolesAll, kLSItemContentType, (CFTypeRef *)&theUTI);


On 10.5 and later you can use -[NSWorkspace typeOfFile:error:].

--
Adam

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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 Example (From: Adam Thorsen <email@hidden>)

  • Prev by Date: UTI Example
  • Next by Date: textfield not updating with bindings - Whats wrong?
  • Previous by thread: UTI Example
  • Next by thread: Re: UTI Example
  • Index(es):
    • Date
    • Thread