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

Function DumpFile

src/leveldb/db/dumpfile.cc:214–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212} // namespace
213
214Status DumpFile(Env* env, const std::string& fname, WritableFile* dst) {
215 FileType ftype;
216 if (!GuessType(fname, &ftype)) {
217 return Status::InvalidArgument(fname + ": unknown file type");
218 }
219 switch (ftype) {
220 case kLogFile:
221 return DumpLog(env, fname, dst);
222 case kDescriptorFile:
223 return DumpDescriptor(env, fname, dst);
224 case kTableFile:
225 return DumpTable(env, fname, dst);
226 default:
227 break;
228 }
229 return Status::InvalidArgument(fname + ": not a dump-able file type");
230}
231
232} // namespace leveldb

Callers 1

HandleDumpCommandFunction · 0.85

Calls 5

GuessTypeFunction · 0.85
InvalidArgumentFunction · 0.85
DumpLogFunction · 0.85
DumpDescriptorFunction · 0.85
DumpTableFunction · 0.85

Tested by

no test coverage detected