append_path |
Top Previous Next |
Scripts > Class elements and c++ instructions > File handling > append_path
Prototype
str append_path( const str& xsPath1, const str& xsPath2 );
Description
Returns a path combined of the parts xsPath1 and xsPath2 in which they are connected by a path separator. If xsPath1 or xsPath2 is empty, then the respectively other part is returned without attaching a path separator.
Example:
str sLogPath = append_path ( current_path(), "log.txt");
instead of
str sLog = current_path() + path_separator + "log.txt";
Under Windows is valid:
append_path("a", "b") == "a\\b" append_path("a\\", "b") == "a\\b" append_path("a", "\\b") == "a\\b" append_path("a\\", "\\b") == "a\\b" append_path("a", "") == "a" append_path("", "b") == "b" |
This page belongs to the TextTransformer Documentation |
Home Content German |