2022-10-21 19:39:55 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "mergefile.h"
|
|
|
|
|
|
|
|
// a list of files with the same size
|
|
|
|
class Files {
|
|
|
|
public:
|
2022-10-22 00:43:34 +02:00
|
|
|
Files();
|
|
|
|
|
2022-10-23 00:48:15 +02:00
|
|
|
void addNewFile(std::shared_ptr<File> file, Hash hash);
|
2022-10-21 19:39:55 +02:00
|
|
|
|
2022-10-23 00:48:15 +02:00
|
|
|
// check if at least one file can be deduplicated
|
|
|
|
bool hasDuplicates() const;
|
|
|
|
|
|
|
|
uint32_t getFileCount() const;
|
|
|
|
std::vector<MergeFile>& getFiles();
|
|
|
|
const std::vector<MergeFile>& getFiles() const;
|
2022-10-21 19:39:55 +02:00
|
|
|
private:
|
|
|
|
std::vector<MergeFile> files;
|
|
|
|
};
|