Check if a given path exists
- Parameters
-
path | the path to be checked |
- Returns
- whether or not the given path exists
Definition at line 105 of file DimWriteStatistics.cc.
References MessageImp::Error().
Referenced by DataLogger::DoesPathExist(), GetUpdateInterval(), and EventBuilderWrapper::InitRunNumber().
107 namespace fs = boost::filesystem;
112 const fs::path fullPath = fs::system_complete(fs::path(path));
114 if (!fs::exists(fullPath))
117 if (!fs::is_directory(fullPath))
119 log.
Error(
"Path given for checking '" + path +
"' designate a file name. Please provide a path name only");
123 if (access(path.c_str(), R_OK|W_OK|X_OK) != 0)
125 log.
Error(
"Missing read, write or execute permissions on directory '" + path +
"'");
int Error(const std::string &str)