C++ Library to handle BagIt structures. BagIt is a standard format to create transfer packages for digital preservation purposes. See https://en.wikipedia.org/wiki/BagIt for details http://andreas-romeyke.de
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.5 KiB

#include "tagmanifest.hpp"
#include <iostream>
#include <fstream>
#include <sstream>
#include <boost/filesystem.hpp>
//#include <filesystem> // c++17
//namespace fs = std::filesystem;
namespace fs = boost::filesystem;
using namespace std;
Tagmanifest::Tagmanifest( string basedir ) : Manifest::Manifest (basedir, "tagmanifest-") {
}
multimap<checksum_string_t,filename_t> Tagmanifest::get_checksum_file_pairs(checksum_algorithms alg) {
//cout << "DEBUG: begin Tagmanifest::get_checksum_file_pairs" << endl;
multimap<checksum_string_t,filename_t> checksum_file_pairs = Manifest::get_checksum_file_pairs(alg);
//cout << "DEBUG: called super->get_checksum_file_pairs" << endl;
for (auto & checksum_file_pair : checksum_file_pairs) {
// cout << "DEBUG: TAGMANIFEST found 'data/' in the beginning of file '"<<it->second<<"' in tagmanifest file '"<< this->manifest_algorithm_files[ alg] << endl;
if (checksum_file_pair.second.find( "data/" ) == 0) {
cout << "found 'data/' in the beginning of file '"<<checksum_file_pair.second<<"' in tagmanifest file '"<< this->manifest_algorithm_files[ alg] << endl;
}
}
//cout << "TAGMANIFEST get_checksum_file_pairs, calling debug()" << endl;
//this->debug();
//cout << "TAGMANIFEST get_checksum_file_pairs, finished" << endl;
return checksum_file_pairs;
}
bool Tagmanifest::has_tagmanifest() {
return Manifest::exist_manifest_files;
}
// vim: set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab