• 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: Adrian Ross <email@hidden>
  • Date: Wed, 5 Dec 2007 12:34:12 +1300

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


  • Follow-Ups:
    • Re: Determine whether a file has a custom icon
      • From: Dominik Pich <email@hidden>
References: 
 >Re: Determine whether a file has a custom icon (From: Rainer Brockerhoff <email@hidden>)

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