• 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: FSRef -> NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FSRef -> NSString


  • Subject: Re: FSRef -> NSString
  • From: Clark Mueller <email@hidden>
  • Date: Thu, 16 Jan 2003 16:48:02 -0700

This does what I'm looking for.

Thanks!

Clark

On Thursday, January 16, 2003, at 01: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.
_______________________________________________
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.

References: 
 >Re: FSRef -> NSString (From: email@hidden)

  • Prev by Date: Re: Patching an application (long)
  • Next by Date: Re: Patching an application (long)
  • Previous by thread: Re: FSRef -> NSString
  • Next by thread: NSDrawer offset problem (class bugs)
  • Index(es):
    • Date
    • Thread