| 34 | const string DELETE_DELTA_PREFIX = "delete_delta_"; |
| 35 | |
| 36 | string GetParentDirName(const string& filepath) { |
| 37 | int slash_before_file = filepath.rfind('/'); |
| 38 | if (slash_before_file == string::npos) return ""; |
| 39 | int slash_before_dirname = filepath.rfind('/', slash_before_file - 1); |
| 40 | if (slash_before_dirname == string::npos) return ""; |
| 41 | return filepath.substr( |
| 42 | slash_before_dirname + 1, slash_before_file - slash_before_dirname - 1); |
| 43 | } |
| 44 | |
| 45 | inline string GetFileName(const string& filepath) { |
| 46 | std::size_t slash_before_file = filepath.rfind('/'); |
no test coverage detected