Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-08-15 13:20:04


Glen Knowles <gknowles_at_[hidden]> writes:

> From: David Abrahams [mailto:dave_at_[hidden]]
>
>>Yes, an absolute URI identifies a single location in the virtual name
>>tree. The only way to make this like a current-drive-relative path is
>>to consider processes which are moved, *during execution*, across a
>>network of computers. I've never heard of systems which do that that,
>>but even if they exist I don't think they make an appropriate model on
>>which to define the notion of "absolute path" in a filesystem library.
>
> The point, and this is the only one that truly compells me, is that:
> http://localhost/blah and /blah are absolute URL paths.
  ^^^^^^^^^^^^^^^^^^^^^ ^^^^^
Portable representation

> c:/blah is an absolute filepath and, to be consistent, /blah should
  ^^^^^^^ ^^^^^
Nonportable, windows-specific representation

> be too.

/blah, when taken as the "portable" string representation a path, is
absolute. When interpreted as a native path on Windows, is anything
but.

> If you look at a drive as equivalent to a URL authority they
> map very well.

But they are not equivalent for any useful definition of the
semantics.

> You can try to argue that an authority such as "localhost" uniquely
> identifies a computer,

I would never argue that, and whether it's a unique identification or
not is completely irrelevant to my argument.

> but that really isn't true. It is normal for mail....com,
> www....com, etc to all refer to the same computer, a computer used
> for webhosting may have thousands of such authorities.
>
>>> If you can give me an example of a multirooted system that refers to
>>> paths that are absolute with respect to the current directory as
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>What does that mean?
>>And what does it mean for a multirooted system to "refer to a path as
>>relative?" Do you mean in the official platform specification, or
>>something else?
>
> I was thinking of platform documentation, preferably an actual
> "is_relative()" system function. I've subsequently found enough
> examples to drop this as an argument.
>
> One thing that I hope we can agree on is that, irrespective of what
> they're called, we do need functions to distinguish between a:/foo,
> /foo, foo, and possibly a:foo.

Are these supposed to be portable strings or windows strings? Unless
you're very clear about that, we really can't hold any discussion.
Also, if you want to distinguish those things above, why not just use
string comparison?

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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