Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-08-26 15:27:28


Beman Dawes <bdawes_at_[hidden]> writes:

> At 10:08 PM 8/25/2003, David Abrahams wrote:
> >David Abrahams <dave_at_[hidden]> writes:
> >
> >> > What about:
> >> >
> >> > assert( p.branch_path().empty() );
> >> >
> >> > Isn't that closer to what you are trying to express?
> >>
> >> I guess so. I didn't see branch_path().
> >
> >BTW, it would feel much more natural to me if it were
> >
> > path root() const;
> > path branch() const;
> > path leaf() const;
> >
> >but because of the portable-ization of non-portable windows path
> >constructs, I think something this simple is impossible.
>
> It isn't just Windows - multi-rooted file systems with named roots are
> a feature of many operating systems. Not to mention URI/URL's.

It isn't multi-rooted systems which cause the problem, though. It's
the need to represent paths that are only rooted under some notion of
"the current root", e.g. the windows path "/foo".

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