Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-09-18 07:17:14

From: "Glen Knowles" <gknowles_at_[hidden]>
> On windows what I want is actually more complex. Assuming a
> make_absolute(relative, base) I expect:
> make_absolute("/foo", "/bar") -> "/foo"
> make_absolute("foo", "/bar") -> "/bar/foo"
> make_absolute("c:foo", "a:/bar") -> throw an error?
> make_absolute("c:/foo", "a:/bar") -> "c:/foo"
> make_absolute("/foo", "a:/bar") -> "a:/foo"

Yes, exactly, except that the first and second examples probably need to
prepend the current drive (or throw an exception demanding "c:/bar" as a
second argument). make_absolute should always return a truly absolute path.

> I understand that this is not at all portable, but it would be good
> to have system specific hooks to handle this sort of thing.

Why is it not portable? make_absolute(r [, b]) returns an absolute path
(independent of current directory changes) that is equivalent to r [assuming
that the current directory is b].

Boost list run by bdawes at, gregod at, cpdaniel at, john at