Elements
5.10
A C++ base framework for the Euclid Software.
|
Go to the documentation of this file.
30 #include <boost/filesystem.hpp>
31 #include <boost/algorithm/string.hpp>
83 string env_content =
getEnv(path_variable);
91 return (not boost::filesystem::exists(p));
93 found_list.
erase(new_end, found_list.
end());
This file is intended to iron out all the differences between systems (currently Linux and MacOSX)
template string joinPath(const vector< path > &path_list)
ELEMENTS_API std::string getEnv(const std::string &var)
get a particular environment variable
ELEMENTS_API const std::map< Type, const std::vector< std::string > > DEFAULT_LOCATIONS
map containing the default external locations for each variable
ELEMENTS_API auto split(Args &&... args) -> decltype(splitPath(std::forward< Args >(args)...))
alias for the splitPath function
provide functions to retrieve resources pointed by environment variables
ELEMENTS_API const std::map< Type, const std::vector< std::string > > SUFFIXES
map containing the default project installation suffixes for each variable
ELEMENTS_API std::vector< boost::filesystem::path > getLocationsFromEnv(const std::string &path_variable, bool exist_only=false)
function to get the locations from an environment variable
ELEMENTS_API const std::map< Type, const bool > HAS_SUBLEVELS
map containing the sub-level property of the path components
template path getPathFromEnvVariable< path >(const path &file_name, const string &path_variable)
boost::filesystem::path path
template vector< path > getAllPathFromLocations(const string &file_name, const vector< path > &locations)
template vector< path > multiPathAppend(const vector< string > &initial_locations, const vector< path > &suffixes)
ELEMENTS_API std::vector< boost::filesystem::path > splitPath(const std::string &path_string)
split a string into a vector of path using PATH_SEP
ELEMENTS_API const std::string PATH_SEP
Separator of path entries. Usually ":" on Unix.
const std::string SHLIB_VAR_NAME
name of the shared dynamic library path
template path getPathFromLocations(const string &file_name, const vector< path > &locations)
template vector< path > removeDuplicates(const vector< path > &path_list)
template path getPathFromEnvVariable< string >(const string &file_name, const string &path_variable)
ELEMENTS_API const std::map< Type, const std::string > VARIABLE
map containing the name of the path variable for each type