28 lines
423 B
C++
28 lines
423 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <map>
|
|
#include <memory>
|
|
|
|
#include "file.h"
|
|
#include "files.h"
|
|
#include "searchfolder.h"
|
|
|
|
class Dedup {
|
|
public:
|
|
Dedup();
|
|
~Dedup();
|
|
|
|
void addSearchFolder(const std::string& path, bool recurse = true);
|
|
|
|
void start();
|
|
|
|
private:
|
|
std::map<uint64_t, Files> filesizes;
|
|
std::map<uint64_t, std::shared_ptr<File>> inodes;
|
|
|
|
std::vector<SearchFolder> folders;
|
|
|
|
bool hardlink = true;
|
|
};
|