|
ELEMENTS_API std::string | getAuxiliaryVariableName () |
| retrieve the variable name used for the auxiliary file lookup More...
|
|
template<typename T > |
ELEMENTS_API Path::Item | getAuxiliaryPath (const T &file_name, bool raise_exception=true) |
|
template ELEMENTS_API Path::Item | getAuxiliaryPath (const Path::Item &file_name, bool raise_exception) |
|
template ELEMENTS_API Path::Item | getAuxiliaryPath (const std::string &file_name, bool raise_exception) |
|
ELEMENTS_API std::vector< Path::Item > | getAuxiliaryLocations (bool exist_only=false) |
|
ELEMENTS_API std::string | getConfigurationVariableName () |
| retrieve the variable name used for the configuration file lookup More...
|
|
template<typename T > |
ELEMENTS_API Path::Item | getConfigurationPath (const T &file_name, bool raise_exception=true) |
|
template ELEMENTS_API Path::Item | getConfigurationPath (const Path::Item &file_name, bool raise_exception) |
|
template ELEMENTS_API Path::Item | getConfigurationPath (const std::string &file_name, bool raise_exception) |
|
ELEMENTS_API std::vector< Path::Item > | getConfigurationLocations (bool exist_only=false) |
|
template<typename T , typename... Args> |
ELEMENTS_API std::unique_ptr< T > | make_unique (Args &&... args) |
| Constructs an object of type T and wraps it in a std::unique_ptr using args as the parameter list for the constructor of T. More...
|
|
template<typename T > |
ELEMENTS_API std::vector< T > | pathSearch (const std::string &searched_name, T directory, SearchType search_type) |
| Searches for a file or a directory in a directory. The search can be recursive (SearchType.Recursive) and in that case more than one results can be return. More...
|
|
template ELEMENTS_API std::vector< Path::Item > | pathSearch (const std::string &searched_name, Path::Item directory, SearchType search_type) |
|
template ELEMENTS_API std::vector< std::string > | pathSearch (const std::string &searched_name, std::string directory, SearchType search_type) |
|
ELEMENTS_API std::vector< Path::Item > | pathSearchInEnvVariable (const std::string &file_name, const std::string &path_like_env_variable, SearchType search_type=SearchType::Recursive) |
| Searches for a file or a directory in a path pointed by an environment variable. It can contains collection of colon separated locations. The search can be recursive (SearchType.Recursive) and in that case more than one results can be return. More...
|
|
template vector< string > | pathSearch< string, directory_iterator > (const string &searched_name, string directory) |
|
template vector< Path::Item > | pathSearch< Path::Item, directory_iterator > (const string &searched_name, Path::Item directory) |
|
template vector< string > | pathSearch< string, recursive_directory_iterator > (const string &searched_name, string directory) |
|
template vector< Path::Item > | pathSearch< Path::Item, recursive_directory_iterator > (const string &searched_name, Path::Item directory) |
|
Searches for a file or a directory in a path pointed by an environment variable. It can contains collection of colon separated locations. The search can be recursive (SearchType.Recursive) and in that case more than one results can be return.
- Parameters
-
file_name | Name of the searched file or directory |
path_like_env_variable | The environment variable name that contains the list of directories |
search_type | Two options: SearchType.Local search in directory only SearchType.Recursive search in sub-directories too |
- Returns
- A vector of paths of the files found or empty string, if nothing is found
Iterate over the different directories included in the path-like environment variable, i.e.,
path1:path2:path3 ...
and call pathSearch(...) for each of them
Definition at line 68 of file PathSearch.cpp.
References Elements::Environment::hasKey(), Elements::Examples::log, pathSearch(), and Elements::Kernel::Path::split().