• 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: FSSpec for non-existant file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: FSSpec for non-existant file?
      • From: Raphael Sebbe <email@hidden>
References: 
 >Re: FSSpec for non-existant file? (From: Raphael Sebbe <email@hidden>)

  • Prev by Date: NSImageView in a PrefPane
  • Next by Date: Re: Notes on docs
  • Previous by thread: Re: FSSpec for non-existant file?
  • Next by thread: Re: FSSpec for non-existant file?
  • Index(es):
    • Date
    • Thread