• 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: File Path -> FSSpec?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File Path -> FSSpec?


  • Subject: Re: File Path -> FSSpec?
  • From: Eric Schlegel <email@hidden>
  • Date: Thu, 25 Oct 2001 21:06:28 -0700

On Thursday, October 25, 2001, at 08:13 PM, Johnny CN Lee wrote:

Yes. But FSMakeFSSpec doesn't recognize UNIX file path
("/path/filename.ext").

Anyway, I've found a way to do it: Use NSFileManager's
fileAttributesAtPath:traverseLink:, then use NSFileDeviceIdentifier as
vRefNum, and fileSystemFileNumber as dirID, and pass an empty string to
FSMakeFSSpec to create the FSSpec structure.


A better way would be:

FSRef fsRef;
FSSpec fsSpec;
FSPathMakeRef( pathString, &fsRef, NULL );
FSGetCatalogInfo( &fsRef, 0, NULL, NULL, &fsSpec, NULL );

-eric


References: 
 >Re: File Path -> FSSpec? (From: Johnny CN Lee <email@hidden>)

  • Prev by Date: Re: Drawing a String in Java
  • Next by Date: NSCalendarDate loses retain count.
  • Previous by thread: Re: File Path -> FSSpec?
  • Next by thread: NSCalendarDate loses retain count.
  • Index(es):
    • Date
    • Thread