From: Glen Knowles (gknowles_at_[hidden])
Date: 2002-09-18 12:26:24
From: Peter Dimov [mailto:pdimov_at_[hidden]]
> 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.
Actually the first two should behave as written, and I certainly don't
want it to pull in additional information (the current drive) from
elsewhere. They are "relative to the current drive" and should stay
that way. Perhaps we're not asking for quite the same thing, a better
syntax for what I want might be:
path("/foo").relative_to("a:/bar") -> "a:/foo"
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk