|
21 | 21 |
|
22 | 22 | #include "ElementsKernel/PathSearch.h" |
23 | 23 |
|
24 | | -#include <string> // for allocator, string, basic_string |
25 | | -#include <vector> // for vector |
| 24 | +#include <filesystem> // for directory_iterator, recursive_directory_iterator |
| 25 | +#include <string> // for allocator, string, basic_string |
| 26 | +#include <vector> // for vector |
26 | 27 |
|
27 | | -#include <boost/algorithm/string.hpp> // for is_any_ofF, is_any_of, split |
28 | | -#include <boost/filesystem/operations.hpp> // for exists, is_directory |
29 | | -#include <boost/filesystem/path.hpp> // for operator==, path |
| 28 | +#include <boost/algorithm/string.hpp> // for is_any_ofF, is_any_of, split |
30 | 29 |
|
31 | 30 | #include "ElementsKernel/Environment.h" // for Environment |
32 | 31 | #include "ElementsKernel/Logging.h" // for Logging |
33 | 32 | #include "ElementsKernel/Path.h" // for Item |
34 | 33 |
|
35 | | -namespace boost::filesystem { |
36 | | -class directory_iterator; |
37 | | -} |
38 | | -namespace boost::filesystem { |
39 | | -class recursive_directory_iterator; |
40 | | -} |
41 | | - |
42 | 34 | using std::string; |
43 | 35 | using std::vector; |
44 | 36 |
|
45 | | -using boost::filesystem::directory_iterator; |
46 | | -using boost::filesystem::recursive_directory_iterator; |
| 37 | +using std::filesystem::directory_iterator; |
| 38 | +using std::filesystem::recursive_directory_iterator; |
47 | 39 |
|
48 | 40 | namespace Elements { |
49 | 41 | inline namespace Kernel { |
@@ -93,7 +85,7 @@ vector<Path::Item> pathSearchInEnvVariable(const string& file_name, const string |
93 | 85 | // Loop over all path elements |
94 | 86 | for (const string& path_element : path_elements) { |
95 | 87 | // Check if directory exists |
96 | | - if (boost::filesystem::exists(path_element) && boost::filesystem::is_directory(path_element)) { |
| 88 | + if (std::filesystem::exists(path_element) && std::filesystem::is_directory(path_element)) { |
97 | 89 | // loop recursively inside directory |
98 | 90 | auto single_path_results = pathSearch(file_name, Path::Item{path_element}, search_type); |
99 | 91 | search_results.insert(search_results.end(), single_path_results.cbegin(), single_path_results.cend()); |
|
0 commit comments