MCPcopy Create free account
hub / github.com/ElementsProject/elements / GuessType

Function GuessType

src/leveldb/db/dumpfile.cc:26–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24namespace {
25
26bool 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.
39class CorruptionReporter : public log::Reader::Reporter {

Callers 1

DumpFileFunction · 0.85

Calls 3

ParseFileNameFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected