Re: UTI Example
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>) |