Re: Determine whether a file has a custom icon
Re: Determine whether a file has a custom icon
- Subject: Re: Determine whether a file has a custom icon
- From: Dominik Pich <email@hidden>
- Date: Wed, 5 Dec 2007 00:43:41 +0100
No need for FSRef IMHO - use NSWorkspace iconForFile and
iconForFyleType !?
Am Dec 5, 2007 um 12:34 AM schrieb Adrian Ross:
Depends on what sort of "custom icon" you mean. kHasCustomIcon is
set when an actual custom icon was pasted into the Finder's Get
Info window.
Then there are the special icons displayed for certain folders,
like /Applications, ~/Downloads and so forth. The generic way to
test for these is to obtain a FSRef for the folder, then call
GetIconRefFromFileInfo() on it. Then you can (for instance) get the
IconRef for the generic folder by calling
GetIconRefFromTypeInfo(kSystemIconsCreator,kGenericFolderIcon...)
and compare if they're equal.
I'm interested in what the Finder displays rather than how the icon
got there (custom icon, application icon etc) so your solution works
well for me.
_______________________________________________
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
_______________________________________________
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