| 114 | } |
| 115 | |
| 116 | auto get_files_name(const std::filesystem::path& dir_path, const std::string& ext) -> std::vector<std::string> { |
| 117 | std::vector<std::string> names; |
| 118 | |
| 119 | for (std::filesystem::directory_iterator it{dir_path}; it != std::filesystem::directory_iterator{}; ++it) { |
| 120 | if (std::filesystem::is_regular_file(it->status())) { |
| 121 | if (it->path().extension() == ext) { |
| 122 | names.push_back(it->path().stem().string()); |
| 123 | } |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | return names; |
| 128 | } |
| 129 | |
| 130 | auto util::str_contains(const std::string& haystack, const std::string& needle) -> bool { |
| 131 | // This helper indicates if the needle is contained in the haystack string, |