Re: FSRef -> NSString
Re: FSRef -> NSString
- Subject: Re: FSRef -> NSString
- From: email@hidden
- Date: Thu, 16 Jan 2003 09:21:41 +0100
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.