MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / computeFileHash

Method computeFileHash

src/openms/source/FORMAT/FileHandler.cpp:551–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

549 }
550
551 String FileHandler::computeFileHash(const String& filename)
552 {
553 QCryptographicHash crypto(QCryptographicHash::Sha1);
554 QFile file(filename.toQString());
555 file.open(QFile::ReadOnly);
556 while (!file.atEnd())
557 {
558 crypto.addData(file.read(8192));
559 }
560 return String((QString)crypto.result().toHex());
561 }
562
563 bool FileHandler::loadFeatures(const String& filename, FeatureMap& map, FileTypes::Type force_type)
564 {

Callers

nothing calls this directly

Calls 6

atEndMethod · 0.80
StringClass · 0.50
toQStringMethod · 0.45
openMethod · 0.45
addDataMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected