| 42 | } |
| 43 | |
| 44 | std::string formatDebugPathInfo(const std::filesystem::path& path) |
| 45 | { |
| 46 | std::ostringstream oss; |
| 47 | // convert to UTF-8 to handle non-ascii/non-latin1 filenames on windows |
| 48 | // cast is required to work in C++20 where u8string is char8_t which can't be printed to char stream |
| 49 | oss << " Provided path: " << reinterpret_cast<const char*>(path.u8string().c_str()) << '\n' // |
| 50 | << " Absolute path: " << reinterpret_cast<const char*>(std::filesystem::absolute(path).u8string().c_str()); |
| 51 | return oss.str(); |
| 52 | } |
| 53 | |
| 54 | std::FILE* openFile(const std::filesystem::path& filename, std::string_view mode) |
| 55 | { |
no outgoing calls
no test coverage detected