Boost logo

Boost :

From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2003-08-15 15:23:20


At Friday 2003-08-15 08:35, you wrote:
>David Abrahams wrote:
> > Glen Knowles <gknowles_at_[hidden]> writes:
> >
> >>> From: David Abrahams [mailto:dave_at_[hidden]]
> >>>>> portable_path("/foo/bar") <- throws on Windows
> >>>>
> >>>> Not sure why this would throw, what is the purpose of
> >>>> portable_path? "/foo/bar" is perfectly reasonable on Windows.
> >>>
> >>> It's perfectly reasonable but it doesn't have a portable meaning.
> >>> It
> >>> is a relative path w.r.t. the drive of the current directory.
> >>
> >> Almost all paths are relative w.r.t. something, the current users
> >> filesystem mapping, the computer, the network.
> >
> > I find that somewhat compelling... but in the end it doesn't hold up.
> >
> >> I don't see how
> >> leaving out the drive makes it less portable then leaving out the
> >> computer name.
> >
> > It's less portable because how it is to be interpreted *with respect
> > to the filesystem* can change dynamically. Remember the name of this
> > library, "filesystem"? ;->
> >
> > Filesystems belong to computers. A computer's filesystem is accessed
> > via an infinite tree of names (**). How those names which correspond
> > actual storage are mapped can be modified dynamically in any number of
> > ways: you can have symbolic and hard links, mount drives, remote
> > computers can come online or go away, non-storage devices can be
> > mounted at locations in the tree etc. The one constant is the
> > structure of the tree of names which allows us to access a virtual
> > location in the filesystem (as opposed to physical).
> >
> > A path is a set of instructions for traversing the name tree. By any
> > reasonable definition, an absolute path identifies a single virtual
> > location in a filesystem's name tree, not one that can change based on
> > the process state. A path on windows that starts with '/' is a set
> > of instructions which begins: "go to the root of the current
> > directory path".
>
>Correction. It does not mean that. It means go to the root directory of the
>current drive. It is still not an absolute path since the current drive
>changes. If one specified 'a:/', then that is an absolute path as defined
>under Windows. Even if 'a:' were a removable disk, and thus could be
>physically changed, it would be considered an absolute path.

I see you don't perceive changing a removable medium with changing the
"state" of the machine (interesting perception of state).

IMO, it's unfortunate everyone else seems to have ignored the Amiga's
(superb) idea of using the "volume label" followed by a ':' as an
identifier for the root on [removable] volumes. I realize that having
multiple removable media w/ the same volume label still doesn't make this
"absolute", but it beats the snot out of what Microsoft currently provides.

Victor A. Wagner Jr. http://rudbek.com
The five most dangerous words in the English language:
               "There oughta be a law"


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk