| 43 | } |
| 44 | |
| 45 | std::vector<std::filesystem::path> collect_existing( |
| 46 | const std::filesystem::path & root, |
| 47 | const std::vector<std::string> & relative_candidates) { |
| 48 | std::vector<std::filesystem::path> results; |
| 49 | results.reserve(relative_candidates.size()); |
| 50 | for (const auto & candidate : relative_candidates) { |
| 51 | const auto path = root / candidate; |
| 52 | if (is_existing_file(path) || is_existing_directory(path)) { |
| 53 | results.push_back(std::filesystem::weakly_canonical(path)); |
| 54 | } |
| 55 | } |
| 56 | return results; |
| 57 | } |
| 58 | |
| 59 | std::string read_text_file(const std::filesystem::path & path) { |
| 60 | std::ifstream input(path, std::ios::binary); |
nothing calls this directly
no test coverage detected