| 92 | namespace { |
| 93 | |
| 94 | std::string ParentDirectory(const std::string& path) { |
| 95 | const std::string::size_type pos = path.find_last_of("/\\"); |
| 96 | if (pos == std::string::npos) { |
| 97 | return ""; |
| 98 | } |
| 99 | return path.substr(0, pos); |
| 100 | } |
| 101 | |
| 102 | bool IsReadableFile(const std::string& path) { |
| 103 | std::ifstream ifs(path.c_str()); |
no test coverage detected