Re: Determining whether a file has a custom icon
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