| 24 | namespace { |
| 25 | |
| 26 | bool GuessType(const std::string& fname, FileType* type) { |
| 27 | size_t pos = fname.rfind('/'); |
| 28 | std::string basename; |
| 29 | if (pos == std::string::npos) { |
| 30 | basename = fname; |
| 31 | } else { |
| 32 | basename = std::string(fname.data() + pos + 1, fname.size() - pos - 1); |
| 33 | } |
| 34 | uint64_t ignored; |
| 35 | return ParseFileName(basename, &ignored, type); |
| 36 | } |
| 37 | |
| 38 | // Notified when log reader encounters corruption. |
| 39 | class CorruptionReporter : public log::Reader::Reporter { |
no test coverage detected