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

Method GetFiles

src/leveldb/db/recovery_test.cc:112–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110 uint64_t FirstLogFile() { return GetFiles(kLogFile)[0]; }
111
112 std::vector<uint64_t> GetFiles(FileType t) {
113 std::vector<std::string> filenames;
114 ASSERT_OK(env_->GetChildren(dbname_, &filenames));
115 std::vector<uint64_t> result;
116 for (size_t i = 0; i < filenames.size(); i++) {
117 uint64_t number;
118 FileType type;
119 if (ParseFileName(filenames[i], &number, &type) && type == t) {
120 result.push_back(number);
121 }
122 }
123 return result;
124 }
125
126 int NumLogs() { return GetFiles(kLogFile).size(); }
127

Callers

nothing calls this directly

Calls 4

ParseFileNameFunction · 0.85
GetChildrenMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected