• 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: Dealing with slash characters with fopen?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: plist warnings on old project
  • Next by Date: Examine events?
  • Previous by thread: Re: Dealing with slash characters with fopen?
  • Next by thread: STATIC.a library complains on "illegal reference for -dynamic code"
  • Index(es):
    • Date
    • Thread