aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/ArchiveFileOperator.h
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2023-12-28 06:32:49 +0000
committersaturneric <[email protected]>2023-12-28 06:32:49 +0000
commit300e55bf5bddc393de050c2ca9a0356fce9a8a9d (patch)
tree8332e6b50158718ad98c954302951668a57712a8 /src/core/function/ArchiveFileOperator.h
parentfeat: avoid reading entire file to memory (diff)
downloadGpgFrontend-300e55bf5bddc393de050c2ca9a0356fce9a8a9d.tar.gz
GpgFrontend-300e55bf5bddc393de050c2ca9a0356fce9a8a9d.zip
feat: add simple archiving functions for encrypt and decrypt
Diffstat (limited to 'src/core/function/ArchiveFileOperator.h')
-rw-r--r--src/core/function/ArchiveFileOperator.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/function/ArchiveFileOperator.h b/src/core/function/ArchiveFileOperator.h
index 7cbe644c..86a3070d 100644
--- a/src/core/function/ArchiveFileOperator.h
+++ b/src/core/function/ArchiveFileOperator.h
@@ -29,6 +29,7 @@
#pragma once
#include "core/GpgFrontendCore.h"
+#include "core/typedef/CoreTypedef.h"
#include "core/utils/IOUtils.h"
namespace GpgFrontend {
@@ -50,10 +51,8 @@ class GPGFRONTEND_CORE_EXPORT ArchiveFileOperator {
* @param compress
* @param files
*/
- static void CreateArchive(const std::filesystem::path &base_path,
- const std::filesystem::path &archive_path,
- int compress,
- const std::vector<std::filesystem::path> &files);
+ static void NewArchive2Fd(const std::filesystem::path &target_directory,
+ int fd, const OperationCallback &cb);
/**
* @brief
@@ -61,7 +60,8 @@ class GPGFRONTEND_CORE_EXPORT ArchiveFileOperator {
* @param archive_path
* @param base_path
*/
- static void ExtractArchive(const std::filesystem::path &archive_path,
- const std::filesystem::path &base_path);
+ static void ExtractArchiveFromFd(int fd,
+ const std::filesystem::path &target_path,
+ const OperationCallback &cb);
};
} // namespace GpgFrontend