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
in
> std::string objects.
>
> -- Darin
>
>
> Info: http://www.boost.org Send unsubscribe requests to:
<mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk