83{
84 std::vector<std::filesystem::path> found;
85 std::error_code code;
86 for (const auto& root : roots) {
87 if (!std::filesystem::is_directory(root, code)) {
88 continue;
89 }
90 for (std::filesystem::recursive_directory_iterator it(root, code), end; it != end; it.increment(code)) {
91 if (code) {
92 break;
93 }
94 if (it->is_regular_file(code) && it->path().filename().string().ends_with(suffix)) {
95 found.push_back(std::filesystem::canonical(it->path(), code));
96 }
97 }
98 }
99 std::ranges::sort(found);
100 found.erase(std::ranges::unique(found).begin(), found.end());
101 return found;
102}