
Hi: Cheers Scott. How can I obtain this path as a string? Sean. -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Scott McMurray Sent: 02 February 2009 18:16 To: boost-users@lists.boost.org Subject: Re: [Boost-users] [boost.filesystem] query On Mon, Feb 2, 2009 at 13:05, Sean Farrow <sean.farrow@seanfarrow.co.uk> 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@lists.boost.org 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