Re: FSRef -> NSString
Re: FSRef -> NSString
- Subject: Re: FSRef -> NSString
- From: Hsu <email@hidden>
- Date: Thu, 16 Jan 2003 06:58:22 -0800
How about FSRefMakePath, then stringWithCString?
Karl
On Thursday, January 16, 2003, at 12:21 AM, email@hidden wrote:
On jeudi, janvier 16, 2003, at 07:18 AM, Clark Mueller wrote:
Is there a way to convert from an FSRef structure to an NSString?
Yes,
convert the FSRef to a CFURLRef , cast the CFURLRef to a NSURL (this
part is optional) and use the NSURL method to get he Posix path name
in a NSString.
NSString * myString;
CFURLRef myURLRef;
myURLRef =CFURLCreateFromFSRef(kCFAllocatorDefault, &myFSRef);
if (myURLRef!=NULL)
{
myString =[(NSURL *) myURLRef path];
}
_______________________________________________
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.
--
Frogs are my favorite vegetable.
Homepage:
http://homepage.mac.com/khsu/index.html
_______________________________________________
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.