Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-31 16:09:32

I think this might be a good argument for a pathname class:

assert( std::string("a/b/../c") == std::string("a/c") );

Of course, determining path equality reliably is much more complicated than
this, and in general you can't do it with just relative paths:

    path("../a/b/c") ==? path("b/c")

----- Original Message -----
From: "Darin Adler" <darin_at_[hidden]>
To: "Boost" <boost_at_[hidden]>
Sent: Thursday, January 31, 2002 3:25 PM
Subject: Re: [boost] pathname manipulation

> On 1/31/02 11:52 AM, "Peter Dimov" <pdimov_at_[hidden]> wrote:
> > About the original thread: isn't std::string sufficient as a "pathname
> > class"?
> I was thinking the same thing.
> It would indeed be nice to have a set of functions that manipulate
> pathnames. But if these are truly pathnames, and not "abstract file system
> locations", then would make them functions that work on pathnames stored
> std::string objects.
> -- Darin
> Info: Send unsubscribe requests to:
> Your use of Yahoo! Groups is subject to

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