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

Re: Determining whether a file has a custom icon


  • Subject: Re: Determining whether a file has a custom icon
  • From: "Alexander v. Below" <email@hidden>
  • Date: Fri, 2 Sep 2005 10:53:56 +0200

You need to query the Finder flags for this, I don't think it can be done with Cocoa:

result = FSPathMakeRef((UInt8*)[nsStringPath cString], &fsRef, &isDir);
if (result != noErr)
return result;

result = FSGetCatalogInfo(&fsRef, kFSCatInfoFinderInfo, &catalogInfo, NULL, NULL, NULL);
fInfo = (FInfo*)&catalogInfo.finderInfo;


Check the documentation for FSGetCatalogInfo, the Custom Icon is determined in fInfo->fdFlags |= kHasCustomIcon;

Cheers

Alex


Am 02.09.2005 um 10:48 schrieb Giovanni Donelli:

Dear folks,
I'm working with an application that loads buch of file icons. And I found out that, for example, it is useless to load the icon of a default folder when I can use an other cached image of a default folder I have in memory already.


Does anybody know how I can determine if a file has a custom icon or a mac os x default one?

Thanks!

Giovanni

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Determining whether a file has a custom icon (From: Giovanni Donelli <email@hidden>)

  • Prev by Date: Determining whether a file has a custom icon
  • Next by Date: Trouble with NSNumberFormatter Behavior in 10.4
  • Previous by thread: Determining whether a file has a custom icon
  • Next by thread: Trouble with NSNumberFormatter Behavior in 10.4
  • Index(es):
    • Date
    • Thread