From: Darin Adler (darin_at_[hidden])
Date: 2002-01-28 10:37:08
On 1/28/02 7:20 AM, "Ken Hagan" <k.hagan_at_[hidden]> wrote:
> I confess my ignorance of the Mac here. If I don't set the type
> correctly, is my file "usable"? Should well-behaved Mac apps set
> an appropriate type for any files they create?
On pre-OS-X Mac OS: No, it's not usable. Yes, type must be set on files any
In addition, on Mac OS X, well-behaved Macintosh applications use extensions
when creating files, and set a flag that tells the operating system not to
show the extension to the user by default if the user didn't specify the
extension explicitly when naming the file.
Beyond that, some well-behaved OS X applications will also set an
appropriate type for optimal behavior when mixed with OS 9 applications
running in the Classic environment.
This is also part of the cultural requirement you are talking about, but
it's not clear if a pathname library needs to deal with this.
> I think you've set the scope too narrowly. It isn't much use being
> able to parse "filenames" if the resulting strings cannot be used
> to create or open the corresponding files on the target platform.
> That means we have to look at things like file-types which are only
> present on some file systems, but which might be compulsory on those
That's true, but there's a separate issue on pre-OS-X Mac OS in that a path
name does not uniquely identify a single file or directory when multiple
volumes have the same name.
> There's also a strong argument for a library that can handle *any*
> name that is legal on the target platform, so that it can be used
> to write a backup utility or with a user-specified filename. (What
> could be more infuriating than a program which can't find a file
> even when you type the name in by hand?)
And any library that used path names exclusively would not be able to do
this on pre-OS-X Mac OS.
> To a lesser extent, a platform-neutral library should also generate
> pathnames that follow the accepted conventions of the platform.
> (Look at the discussion of a command line parser, where folk are
> getting worked up over supporting the "usual" syntax on their OS.
> Getting the culture right matters.)
An excellent point.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk