Data_deduplication_service
Service that will use hashes to deduplicate files
fileUtils.h File Reference
#include <filesystem>
#include <concepts>
#include <fstream>
#include <unordered_set>
#include "expected.hpp"
#include "myConcepts.h"
+ Include dependency graph for fileUtils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 file_services
 file services namespace
 

Enumerations

enum  file_services::dbUsageStrategy { file_services::use , file_services::create }
 
enum  file_services::dataInsetionStrategy { file_services::PreserveOld , file_services::ReplaceWithNew }
 
enum  file_services::dataRetrievalStrategy { file_services::Persist , file_services::Remove }
 
enum  file_services::rootDirectoryHandlingStrategy { file_services::NoCreateMain , file_services::CreateMain }
 

Functions

tl::expected< std::string, int > file_services::checkFileExistence (std::string_view filePath)
 
tl::expected< std::string, int > file_services::checkDirectoryExistence (std::string_view dirPath)
 
template<typename T , typename A >
requires std::is_same_v< T, A > std::is_same_v< T, typename std::remove_const< A >::type > std::is_same_v< A, typename std::remove_const< T >::type > int file_services::compareBlock (size_t size, T *arr, A *arr2)
 
std::array< size_t, 4 > file_services::compareFiles (const fs::path &file1, const fs::path &file2, size_t segmentSize)
 
std::array< size_t, 4 > file_services::compareDirectories (const fs::path &file1, const fs::path &file2, size_t segmentSize)
 
fs::path file_services::getNormalAbs (const fs::path &path)