MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / ConcatPaths

Method ConcatPaths

tests/gtest/gtest-all.cc:9432–9438  ·  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

9430// Given directory = "dir", relative_path = "test.xml", returns "dir/test.xml".
9431// On Windows, uses \ as the separator rather than /.
9432FilePath FilePath::ConcatPaths(const FilePath& directory,
9433 const FilePath& relative_path) {
9434 if (directory.IsEmpty())
9435 return relative_path;
9436 const FilePath dir(directory.RemoveTrailingPathSeparator());
9437 return FilePath(dir.string() + kPathSeparator + relative_path.string());
9438}
9439
9440// Returns true if pathname describes something findable in the file-system,
9441// either a file, directory, or whatever.

Callers

nothing calls this directly

Calls 2

FilePathFunction · 0.85

Tested by

no test coverage detected