From: Miro Juri¹iæ (macdev_at_[hidden])
Date: 2004-08-17 03:31:01
> I'm not sure sure how helpful the CFURL stuff is for what I'm doing,
> as I'm not sure there's an easy way to get HFS paths out of them when
> running under OS X (as I hinted before, why on earth would you want an
> HFS path at all under OS X, except to make the MSL happy).
It's trivial, if you call CFURLCopyFileSystemPath with
However, and I cannot stress this strongly enough, you should not do
this. Ever. HFS paths are incapable of representing every possible file
name on Mac OS X (yes, even if you only restrict yourself to HFS+
names). Any code you write using HFS paths will break as soon as in
encounters a volume, folder, or file whose filename contains a Unicode
character outside the very limited set allowed by HFS, and there is
nothing you can do about it.
> Here's a quick summary of what I'm dealing with: the goal is to be
> able to use boost::filesystem with Metrowerks CodeWarrior and the
> Metrowerks StdLib/STL implementation, MSL, on a CFM Carbon program
> intended to run under OS 9 and OS X.
Here's my opinion: Mac OS 9 is dead. CFM is dead. You are investing
your time in making boost working with dead technologies. It's your
time, so be my guest, but I am opposed to adding skanky hacks (e.g., a
for /Volumes folder on Mac OS 9) or making the existing code base
substantially more complex for a feature as marginally useful as CFM
and Mac OS 9 support are.
You seem to understand exactly what you are going regarding HFS name
mangling and limitations of HFS paths, so I am confident that you will
ultimately reach your goal, but I seriously question the wisdom of
investing this much effort into it -- I think the effort is better
spent figuring out how to transition your code to Mac OS X and Mach-O.
Of course, for all I know, you might be in a market in which Mac OS 9
support is crucial, but I have seen too many people waste too much time
fighting to retain Mac OS 9 support when it was a complete waste of
time, so forgive me if my opinion is completely inapplicable to you.
To summarize, it is my opinion that the boost community should not sink
any time at all into supporting CFM and especially Mac OS 9 (across the
board, not just for this library); by this I also mean that I think
boost should not accept CFM and Mac OS 9 patches that substantially
increase code complexity, due to the inevitable maintenance overhead
that would be incurred by accepting such patches. There are better
things we can do with our limited Mac-specific developer resources.
-- <http://web.meeroh.org/> | KB1FMP "Clue meter is reading zero." -- Alice
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk