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

Re: FSSpec --> OSX Path NSString


  • Subject: Re: FSSpec --> OSX Path NSString
  • From: Frank Midgley <email@hidden>
  • Date: Wed, 12 Mar 2003 14:43:59 -0600

On Wednesday, March 12, 2003, at 05:37 AM, Flemming Bengtsson wrote:

I'm writing an application that needs to convert an OS9 FSSpec structure to an OSX path NSString.
I can't see anyway to do this, hope I'm wrong...

This is really a Carbon question, but if you know the file exists on disk then use FSpMakeFSRef and pass the resultant FSRef to FSRefMakePath to get a C string of the path. If the file doesn't exist you can use FSMakeFSSpec to make an FSSpec for the parent directory, get its path as before and then append the name of the file from the original FSSpec. Actually the later case works for both situations so it's probably the way to go.

-Frank
_______________________________________________
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.

  • Follow-Ups:
    • Re: FSSpec --> OSX Path NSString
      • From: Chris Hanson <email@hidden>
  • Prev by Date: Re[2]: What's with 'dark' @implementation?
  • Next by Date: Carriage Return
  • Previous by thread: Re: FSSpec --> OSX Path NSString
  • Next by thread: Re: FSSpec --> OSX Path NSString
  • Index(es):
    • Date
    • Thread