
20 Apr
2011
20 Apr
'11
6:18 p.m.
I am constructing full path out of directory (c:\temp), filename(test) and extension (txt). boost::filesystem::path mypath(dir); // mypath="c:\temp" mypath /= filename; // mypath="c:\temp\test" If I call mypath.replace_extension("txt") it will fail because there is no dot character yet. To proceed further I have to add "." using direct string manipulation, that kind of break the logic of using filesystem::path. Question: how to construct full path using directory, filename and extension strings using only filesystem::path methods?