Elements  5.8
A C++ base framework for the Euclid Software.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
PathSearch.h
Go to the documentation of this file.
1 
26 #ifndef ELEMENTSKERNEL_ELEMENTSKERNEL_PATHSEARCH_H_
27 #define ELEMENTSKERNEL_ELEMENTSKERNEL_PATHSEARCH_H_
28 
29 #include <string>
30 #include <vector>
31 #include <boost/filesystem.hpp>
32 
33 #include "ElementsKernel/Export.h" // ELEMENTS_API
34 
35 namespace Elements {
36 
37 enum class SearchType {
39 };
40 
58 template <typename T>
60  const std::string& searched_name,
61  T directory,
62  SearchType search_type);
63 
64 // template instantiations of the most common types
65 extern template
67  boost::filesystem::path directory,
68  SearchType search_type);
69 extern template
71  std::string directory,
72  SearchType search_type);
73 
74 
94  const std::string& file_name,
95  const std::string& path_like_env_variable,
96  SearchType search_type = SearchType::Recursive);
97 
98 } // namespace Elements
99 
101 
102 
103 #endif // ELEMENTSKERNEL_ELEMENTSKERNEL_PATHSEARCH_H_
104 
STL class.
defines the macros to be used for explicit export of the symbols
boost::filesystem::path path
Definition: DataSyncUtils.h:33
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.
Definition: Export.h:74
STL class.
ELEMENTS_API std::vector< boost::filesystem::path > 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 coll...
Definition: PathSearch.cpp:68
std::vector< T > pathSearch(const std::string &searched_name, T directory)
Definition: PathSearch.icpp:36