|
Data_deduplication_service
Service that will use hashes to deduplicate files
|
file services namespace More...
Classes | |
| class | FileService |
| this class handles file/directory management and uses dbManager to perform calls More... | |
Enumerations | |
| enum | dbUsageStrategy { use , create } |
| enum | dataInsetionStrategy { PreserveOld , ReplaceWithNew } |
| enum | dataRetrievalStrategy { Persist , Remove } |
| enum | rootDirectoryHandlingStrategy { NoCreateMain , CreateMain } |
Functions | |
| tl::expected< std::string, int > | checkFileExistence (std::string_view filePath) |
| tl::expected< std::string, int > | 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 | compareBlock (size_t size, T *arr, A *arr2) |
| std::array< size_t, 4 > | compareFiles (const fs::path &file1, const fs::path &file2, size_t segmentSize) |
| std::array< size_t, 4 > | compareDirectories (const fs::path &file1, const fs::path &file2, size_t segmentSize) |
| fs::path | getNormalAbs (const fs::path &path) |
| std::filesystem::path | getNormalAbs (const std::filesystem::path &path) |
file services namespace
| tl::expected< std::string, int > file_services::checkDirectoryExistence | ( | std::string_view | dirPath | ) |
This function checks existence of a canonical directory path for dir_path
| dirPath |
Here is the call graph for this function:
Here is the caller graph for this function:| tl::expected< std::string, int > file_services::checkFileExistence | ( | std::string_view | filePath | ) |
This function checks existence of a canonical file path for file_path
| filePath |
Here is the call graph for this function:
Here is the caller graph for this function:| 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 | ||
| ) |
Here is the caller graph for this function:| std::array< size_t, 4 > file_services::compareDirectories | ( | const fs::path & | file1, |
| const fs::path & | file2, | ||
| size_t | segmentSize | ||
| ) |
Compares directory contents
| file1 | |
| file2 | |
| segmentSize | size of blocks to check |
e1 - number of bytes that differ
e2 - number of segments that differ
e3 - total number of segments
e4 - total number of bytes
Here is the call graph for this function:| std::array< size_t, 4 > file_services::compareFiles | ( | const fs::path & | file1, |
| const fs::path & | file2, | ||
| size_t | segmentSize | ||
| ) |
Compares to file paths segment by segment
| file1 | |
| file2 | |
| segmentSize | size of blocks to check |
e1 - number of bytes that differ
e2 - number of segments that differ
e3 - total number of segments
e4 - total number of bytes
Here is the call graph for this function:
Here is the caller graph for this function:| fs::path file_services::getNormalAbs | ( | const fs::path & | path | ) |
Calculates lexically normal absolute path
| path |
Here is the caller graph for this function:| std::filesystem::path file_services::getNormalAbs | ( | const std::filesystem::path & | path | ) |