| 83 | } |
| 84 | |
| 85 | bool IsReadableFile(const std::string& path) { |
| 86 | #if defined(_WIN32) || defined(_WIN64) |
| 87 | const DWORD attributes = |
| 88 | GetFileAttributesW(internal::WideFromUtf8(path).c_str()); |
| 89 | return attributes != INVALID_FILE_ATTRIBUTES && |
| 90 | (attributes & FILE_ATTRIBUTE_DIRECTORY) == 0; |
| 91 | #else |
| 92 | std::ifstream ifs(path.c_str(), std::ios::binary); |
| 93 | return ifs.is_open(); |
| 94 | #endif |
| 95 | } |
| 96 | |
| 97 | std::vector<std::string> SplitSearchPath(const char* raw) { |
| 98 | std::vector<std::string> entries; |
no test coverage detected