Appending to boost::filesystem::path

If it’s really just the file name extension you want to change then you are probably better off writing:

p.replace_extension(".foo");

for most other file path operations you can use the operators /= and / allowing to concatenate parts of a name. For instance

boost::filesystem::path p("c:\\dir");
p /= "subdir";

will refer to c:\dir\subdir.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)