Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost.filesystem] query
From: Sean Farrow (sean.farrow_at_[hidden])
Date: 2009-02-02 13:38:11


Hi:
Cheers Scott. How can I obtain this path as a string?
Sean.
 

-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Scott McMurray
Sent: 02 February 2009 18:16
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] [boost.filesystem] query

On Mon, Feb 2, 2009 at 13:05, Sean Farrow <sean.farrow_at_[hidden]>
wrote:
> I am using boost.filesystem to hold a path including filename. would
> the function stem() of the path object give me the path excluding the
filename?
> If i have:
> c:\program files\boost\welcome.txt
> The output wanted is:
> c:\program files\
> Any help apreciated.
>

path("c:\program files\boost\welcome.txt").parent_path().parent_path()
will give you path("c:\program files")

This table is often the easiest way to find out which function you need:
http://www.boost.org/libs/filesystem/doc/reference.html#Path-decompositi
on-table
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
 

__________ Information from ESET NOD32 Antivirus, version of virus
signature database 3819 (20090202) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
 

__________ Information from ESET NOD32 Antivirus, version of virus
signature database 3819 (20090202) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 


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