Function mrpt::system::pathJoin

Function Documentation

std::string mrpt::system::pathJoin(const std::vector<std::string> &paths)

Portable version of std::filesystem::path::append(), with Python-like name.

mrpt::system::pathJoin({"/home", "foo"}); // -> "/home/foo"
mrpt::system::pathJoin({"/home", "/tmp/a"}); // -> "/tmp/a"
mrpt::system::pathJoin({".", "sub","file.txt"}); // -> "./sub/file.txt"

Note

(New in MRPT 2.5.0)