Re: FSSpec --> OSX Path NSString
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.