Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-08-14 22:16:59


Glen Knowles <gknowles_at_[hidden]> writes:

>> 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.

>>This is also a way we could solve the whole problem of absolute paths.
>>It's clear that "/foo" isn't an absolute native windows path.
>
> This is not at all clear. I have and will contain to argue that "/foo" is an
> absolute windows path, since it does not respect the current
> directory.

If you define anything that is not relative to the current directory
as absolute, maybe you can say that. It seems perverse to say that a
path which is _relative_ to something other than the machine in use
is absolute, though.

> Also very important to me, this goes well with the URI definitions
> of absolute and relative

I'm pretty sure this is an illusion! URIs don't have a notion of
"current drive" do they?

> and it would be nice if the path class could support full URIs.

Are we talking about native or "portable" representation now?
There's no reason they couldn't support full URIs in their portable
representation. It's just a question of how that gets mapped onto
the native filesystem.

-- 
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