Re: FSSpec for non-existant file?
Re: FSSpec for non-existant file?
- Subject: Re: FSSpec for non-existant file?
- From: Rosyna <email@hidden>
- Date: Thu, 15 Nov 2001 01:19:10 -0700
There is a problem with this. It doesn't support over 31 chars in a
file name and only accepts the system encoding (no unicode) the
recommendation was to use a CFURLRef (NSURL) to refer to non-existant
files.
Ack, at 11/15/01, Raphael Sebbe said:
Easiest way, the undocumented and not in any header function:
err = NativePathNameToFSSpec([filename fileSystemRepresentation], &mySpec, 0);
Note also you'll get an error telling the file doesn't exist.
An other way of getting it could be to use an FSRef and a
combination of pascal strings, but it would require a lot more
effort...
I wish Apple made this function public finally because it is so
useful for Cocoa/BSD programmers to play with QuickTime or other
Carbon Managers.
Raphael
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insane People