47 const std::string find =
"~";
48 const std::string replace = getenv(
"HOME");
52 while ((pos=path.find(find, pos))!=std::string::npos) {
53 path.replace(pos, find.length(), replace);
54 pos += replace.length();
57 return std::string(realpath(path.c_str(),buff))+((isDir) ?
"/" :
"");
The class Path used to handle the Cosmobolognalib paths.
std::string fullpath(std::string path, const bool isDir=true)
substitute ~ with the full path
void SetDirs(const std::string input_DirCosmo, const std::string input_DirLoc="./")
set the default directories
Path()
default constructor