| 17 | } |
| 18 | |
| 19 | std::filesystem::path require_directory(const std::filesystem::path & path, std::string_view role) { |
| 20 | if (!is_existing_directory(path)) { |
| 21 | throw std::runtime_error("missing " + std::string(role) + " directory: " + path.string()); |
| 22 | } |
| 23 | return std::filesystem::weakly_canonical(path); |
| 24 | } |
| 25 | |
| 26 | std::filesystem::path require_file(const std::filesystem::path & path, std::string_view role) { |
| 27 | if (!is_existing_file(path)) { |
nothing calls this directly
no test coverage detected