• 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: Determine whether a file has a custom icon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: Determine whether a file has a custom icon (From: Rainer Brockerhoff <email@hidden>)
 >Re: Determine whether a file has a custom icon (From: Adrian Ross <email@hidden>)

  • Prev by Date: Re: [ANN] New version of RegexKit available
  • Next by Date: Re: More Problems with archiving.
  • Previous by thread: Re: Determine whether a file has a custom icon
  • Next by thread: NSString and control-@ character
  • Index(es):
    • Date
    • Thread