From: Glen Knowles (gknowles_at_[hidden])
Date: 2002-09-17 21:50:22
From: Beman Dawes [mailto:bdawes_at_[hidden]]
> Let's see. Here is the code we would like to write:
> path p( argv, system_specific );
> if ( p.xxx() ) p = initial_directory() << p;
> Say the user input is "foo" - p.xxx() should be true.
> Say the user input is "/foo" (or "c:/foo" on Windows) - then p.x()
> should be false.
> So far, so good. Here comes the problem: what if on Windows the user
> input is "/foo". That needs to return false.
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"
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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk