Function mrpt::system::toAbsolutePath
Defined in File filesystem.h
Function Documentation
-
std::string mrpt::system::toAbsolutePath(const std::string &path, bool resolveToCanonical = false)
Portable version of std::filesystem::absolute() and canonical()
If
canonical==truerelative paths, symlinks, etc. will be resolved too, but an exception will be thrown if the referenced file/path does not exist. Ifcanonical==true, an absolute path will be always returned, even if does not actually exist.mrpt::system::toAbsolutePath("/home/joe"); // -> "/home/joe" mrpt::system::toAbsolutePath("../mary"); // -> "/home/mary"
Note
(New in MRPT 2.5.0)