| 688 | }; |
| 689 | |
| 690 | std::string GetParentDirectory(const std::string& path) { |
| 691 | size_t pos = path.rfind('/', path.length() - 1); |
| 692 | if (pos == std::string::npos) { |
| 693 | pos = path.rfind('\\', path.length() - 1); |
| 694 | } |
| 695 | if (pos == std::string::npos) { |
| 696 | return ""; |
| 697 | } |
| 698 | return path.substr(0, pos + 1); |
| 699 | } |
| 700 | |
| 701 | bool isRegularFile(const std::string& path) { |
| 702 | #if defined(_WIN32) || defined(_WIN64) |
no test coverage detected