Boost logo

Boost Users :

Subject: Re: [Boost-users] [Filesystem] query
From: PB (newbarker_at_[hidden])
Date: 2010-09-14 10:55:47


On Tue, Sep 14, 2010 at 7:09 AM, Sean Farrow
<sean.farrow_at_[hidden]> wrote:
> Hi:
>
> I have a path of the form:
>
> Drive\directory1\directory2, how would I go about retrieving the second
> directory only i.e in this example directory2?

You use filename() to get the last element. filename() returns a path object.

> Is this the same code in filesystem 2 and 3?

v2 is leaf(). It might've been known by other names too, but that was
the one I used. It returned a string, not a path.
v3 is filename().

Regards,

Pete


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net