Re: Dealing with slash characters with fopen?
Re: Dealing with slash characters with fopen?
- Subject: Re: Dealing with slash characters with fopen?
- From: Stefan Werner <email@hidden>
- Date: Thu, 30 Nov 2006 21:26:17 +0100 (MET)
At 10:45 PM -0700 11/29/06, Blair M. Burtan wrote:
This is a backward compatibility thing. New universal binary mach-o
conversion of an older CFM app and I'm trying to read in an older
data file
that has the old CFM style paths stored in there.
In that case, it looks like the following sequence would work:
OSErr FSMakeFSSpec (
short vRefNum,
long dirID,
ConstStr255Param fileName,
FSSpec * spec
);
OSErr FSpMakeFSRef (
const FSSpec * source,
FSRef * newRef
);
OSStatus FSRefMakePath (
const FSRef * ref,
UInt8 * path,
UInt32 maxPathSize
);
Use the legacy APIs to interpret the legacy paths, convert to FSRef
and extract a POSIX path.
That doesn't sound like a good idea to me. FSSpecs are deprecated for
a reason.
I would try going through CFURL -
first creating a CFURL from the original name with
CFURLCreateWithFileSystemPath(), using a HFS path style and then
using CFURLGetFileSystemRepresentation() to get the POSIX version.
Stefan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden