MCPcopy Create free account
hub / github.com/catboost/catboost / ListArchiveMd5

Function ListArchiveMd5

tools/archiver/main.cpp:471–484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

469}
470
471static void ListArchiveMd5(const TString& archive, bool cutSlash) {
472 TMappingReader mappingReader(archive);
473 const TArchiveReader& reader = mappingReader.Reader;
474 const size_t count = reader.Count();
475 for (size_t i = 0; i < count; ++i) {
476 const TString key = reader.KeyByIndex(i);
477 TString fileName = key;
478 if (cutSlash) {
479 fileName = CutFirstSlash(key);
480 }
481 char md5buf[33];
482 Cout << fileName << '\t' << MD5::Stream(reader.ObjectByKey(key).Get(), md5buf) << Endl;
483 }
484}
485
486int main(int argc, char** argv) {
487 NLastGetopt::TOpts opts;

Callers 1

mainFunction · 0.85

Calls 6

CutFirstSlashFunction · 0.85
StreamClass · 0.85
CountMethod · 0.45
KeyByIndexMethod · 0.45
GetMethod · 0.45
ObjectByKeyMethod · 0.45

Tested by

no test coverage detected