Re: Using HFS paths in the standard C libraries
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