Re: How to find icon file path, Part II
Re: How to find icon file path, Part II
- Subject: Re: How to find icon file path, Part II
- From: Douglas Davidson <email@hidden>
- Date: Wed, 24 Jul 2002 14:27:06 -0700
On Wednesday, July 24, 2002, at 11:33 AM, Chris Anderson wrote:
GetIconRefFromFile() should give back an 'icon-unique' pointer (I
think!) if
I give it an FSSpec. But that is in turn made (via FSMakeFSSpec) from a
volume reference number and a ConstStr255Param string and a directory
id,
none of which I have any idea how to get from my NSString path... not to
mention how I ought to interpret the 'sint16 *' string that will
contain the
label when GetIconRefFromFile returns...
I'm not prepared right now to offer an opinion on the larger issues, but
to get an FSSpec from an NSString path you can (a) call
fileSystemRepresentation to get a C-string path; (b) call FSPathMakeRef
to get an FSRef; and (c) call FSGetCatalogInfo, in which I believe the
fifth argument returns the FSSpec by reference--something like
FSGetCatalogInfo(&ref, kFSCatInfoNone, NULL, NULL, &spec, NULL). You
may be able to ignore the label.
Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.