Re: FSRef_fopen alternative
Re: FSRef_fopen alternative
- Subject: Re: FSRef_fopen alternative
- From: Jerry <email@hidden>
- Date: Mon, 14 Aug 2006 18:01:01 +0100
On 14 Aug 2006, at 17:50, Edward K. Chew wrote:
On 14-Aug-06, at 9:56 AM, Jerry wrote:
On 14 Aug 2006, at 14:38, Edward K. Chew wrote:
Quick CW to XCode migration question:
I came across a section in my code where I call FSRef_fopen(),
which is like a stdio fopen() but accepts an FSRef instead of a
path. FSRefParentAndFilename_fopen() is another call I use
elsewhere. Unfortunately, both of these appear to be CW-specific
APIs. Would there be XCode equivalents?
Use FSRefMakePath and pass the path to fopen.
Well, that sounds like a straightforward way to go, but is it
bullet-proof? The file in question is user-specified and could be
anywhere on the volume. I was under the impression that there is a
limitation on path lengths, and have shied away from using absolute
paths for this sort of thing.
Yes, you have the limitation of the path length (this has been
extensively discussed on the Carbon-dev mailing list).
Way back, I remember there was some way of specifying the working
directory contain your files (something to do with special volume
reference numbers?), but I don't know if that is still relevant in
OS X. I guess I'll go with the path approach unless I hear
differently.
I believe this still works on OS X, but....
/* This function is deprecated in Mac OS X 10.4. The routines which
use the default volume concept have been deprecated.*/
Jerry
_______________________________________________
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