• 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: Using HFS paths in the standard C libraries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using HFS paths in the standard C libraries


  • Subject: Re: Using HFS paths in the standard C libraries
  • From: "Sean McBride" <email@hidden>
  • Date: Thu, 12 Oct 2006 13:51:23 -0400
  • Organization: Rogue Research

On 2006-10-12 09:35, Ben Staveley-Taylor said:

>I am porting some legacy code from CodeWarrior to XCode. The old code
>was originally written in the days of Mac OS 9 and uses HFS-style paths
>extensively.
>
>Effectively, I want to arrange so that I can write:
>
>   fopen("DiskName:FolderName:FileName.txt")
>
>instead of:
>
>  fopen("/Volumes/DiskName/FolderName/FileName.txt")

I think you'll have to make your own my_fopen() that does the conversion.

Also, keep in mind that HFS paths do _not_ uniquely identify an item.
It is possible to have two identically named volumes, and thus identical
paths to different items.

So I'd bite the bullet and stop using HFS paths.  Use aliases, FSRefs,
posix paths, etc.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 _______________________________________________
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

References: 
 >Using HFS paths in the standard C libraries (From: "Ben Staveley-Taylor" <email@hidden>)

  • Prev by Date: Re: Re: Reducing memory consumption
  • Next by Date: Re: Re: Memory watchpoints
  • Previous by thread: Re: Using HFS paths in the standard C libraries
  • Next by thread: Re: Using HFS paths in the standard C libraries
  • Index(es):
    • Date
    • Thread