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

Method compareFiles

src/openms/source/CONCEPT/FuzzyStringComparator.cpp:589–619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

587 }
588
589 bool FuzzyStringComparator::compareFiles(const std::string& filename_1, const std::string& filename_2)
590 {
591 input_1_name_ = filename_1;
592 input_2_name_ = filename_2;
593
594 if (input_1_name_ == input_2_name_)
595 {
596 *log_dest_ << "Error: first and second input file have the same name. That's cheating!\n";
597 return false;
598 }
599
600 std::ifstream input_1_f;
601 if (!openInputFileStream_(input_1_name_, input_1_f))
602 {
603 return false;
604 }
605
606 std::ifstream input_2_f;
607 if (!openInputFileStream_(input_2_name_, input_2_f))
608 {
609 return false;
610 }
611
612 //------------------------------------------------------------
613 // main loop
614
615 compareStreams(input_1_f, input_2_f);
616
617 return is_status_success_;
618
619 } // compareFiles()
620
621 bool FuzzyStringComparator::openInputFileStream_(const std::string& filename, std::ifstream& input_stream) const
622 {

Callers 11

main_Method · 0.80
isFileSimilarFunction · 0.80
START_SECTIONFunction · 0.80
IdXMLFile_test.cppFile · 0.80
SwathQC_test.cppFile · 0.80
START_SECTIONFunction · 0.80

Calls

no outgoing calls

Tested by 3

isFileSimilarFunction · 0.64
START_SECTIONFunction · 0.64
START_SECTIONFunction · 0.64