MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / ConcatPaths

Method ConcatPaths

rtpose_wrapper/src/gtest/gtest-all.cpp:7618–7625  ·  view source on GitHub ↗

Given directory = "dir", relative_path = "test.xml", returns "dir/test.xml". On Windows, uses \ as the separator rather than /.

Source from the content-addressed store, hash-verified

7616// Given directory = "dir", relative_path = "test.xml", returns "dir/test.xml".
7617// On Windows, uses \ as the separator rather than /.
7618FilePath FilePath::ConcatPaths(const FilePath& directory,
7619 const FilePath& relative_path) {
7620 if (directory.IsEmpty())
7621 return relative_path;
7622 const FilePath dir(directory.RemoveTrailingPathSeparator());
7623 return FilePath(String::Format("%s%c%s", dir.c_str(), kPathSeparator,
7624 relative_path.c_str()));
7625}
7626
7627// Returns true if pathname describes something findable in the file-system,
7628// either a file, directory, or whatever.

Callers

nothing calls this directly

Calls 3

FilePathFunction · 0.85
FormatClass · 0.85

Tested by

no test coverage detected