Re: How to obtain icon displayed by Finder for a file
Re: How to obtain icon displayed by Finder for a file
- Subject: Re: How to obtain icon displayed by Finder for a file
- From: Peter Ammon <email@hidden>
- Date: Wed, 7 Jan 2009 13:52:50 -0800
On Jan 7, 2009, at 1:42 PM, David wrote:
Hello,Is there a way to obtain the icon that finder uses to display
for a
file system object? Such things as the folder icon for folders, PDF
icon for
pdfs etc.
You can use -[NSWorkspace iconForFile:] if you want to get a specific
file's icon, respecting any custom icons.
Use -[NSWorkspace iconForFileType:] if you want to get the icon for a
type. The type can be a filename extension or an HFS type code
encoded via NSFileTypeForHFSTypeCode(). On Leopard or later it can
also be a UTI.
-Peter
_______________________________________________
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