#include <GaudiKernel/PathResolver.h>
Definition at line 10 of file PathResolver.h.
Enumerator |
---|
Ok |
|
EnvironmentVariableUndefined |
|
UnknownDirectory |
|
Definition at line 14 of file PathResolver.h.
Enumerator |
---|
LocalSearch |
|
RecursiveSearch |
|
Definition at line 16 of file PathResolver.h.
search_path
the name of a path-like environment variable
- Returns
- the result of the verification. Can be one of
Ok
, EnvironmentVariableUndefined
, UnknownDirectory
Definition at line 178 of file PathResolver.cpp.
184 boost::split( spv, path_list, boost::is_any_of( path_separator ), boost::token_compress_on );
187 for (
const auto& itr : spv ) {
189 if ( !is_directory(
pp ) ) {
193 }
catch (
const bf::filesystem_error& ) {
GAUDI_API std::string getEnv(const char *var)
get a particular environment variable (returning "UNKNOWN" if not set)
logical_file_name
the name of the directory to locate in the search path
search_path
the name of a path-like environment variable
search_type
characterizes the type of search. Can be either LocalSearch or RecursiveSearch
- Returns
- the physical name of the located directory or empty string if not found
Definition at line 153 of file PathResolver.cpp.
GAUDI_API std::string getEnv(const char *var)
get a particular environment variable (returning "UNKNOWN" if not set)
static std::string find_directory_from_list(const std::string &logical_file_name, const std::string &search_list, SearchType search_type=LocalSearch)
logical_file_name
the name of the directory to locate in the search path
search_list
the prioritized list of possible locations separated by the usual path separator
search_type
characterizes the type of search. Can be either LocalSearch or RecursiveSearch
- Returns
- the physical name of the located directory or empty string if not found
Definition at line 164 of file PathResolver.cpp.
169 if ( !PR_find( logical_file_name, search_list,
PR_directory, search_type, result ) ) {
logical_file_name
the name of the file to locate in the search path
search_path
the name of a path-like environment variable
search_type
characterizes the type of search. Can be either LocalSearch
or RecursiveSearch
- Returns
- the physical name of the located file or empty string if not found
Definition at line 116 of file PathResolver.cpp.
GAUDI_API std::string getEnv(const char *var)
get a particular environment variable (returning "UNKNOWN" if not set)
static std::string find_file_from_list(const std::string &logical_file_name, const std::string &search_list, SearchType search_type=LocalSearch)
logical_file_name
the name of the file to locate in the search path
search_list
the prioritized list of possible locations separated by the usual path separator
search_type
characterizes the type of search. Can be either LocalSearch
or RecursiveSearch
- Returns
- the physical name of the located file or empty string if not found
Definition at line 128 of file PathResolver.cpp.
The documentation for this class was generated from the following files: