26 ArchiveExtractor(
const std::string& path,
bool bExtractLzmaInProc =
false,
bool bExtractLzmaUsing7Zip =
true);
29 std::filesystem::path GetPath()
const;
30 std::string GetExtractionDirectory()
const;
33 static bool IsArchiveTypeSupported(
const std::string& file);
36 bool Extract(
const std::string& destinationPath);
38 static std::filesystem::path getUncompressedFilePath(
const std::filesystem::path& directory,
const std::string& filename);
40 static bool CompressDir(
const std::string& srcDir,
const std::string& destDir,
41 const std::string& archiveName, std::string& fileOut,
44 constexpr static inline bool ALLOW_ALL_ARCHIVE_EXTENSION_TYPES =
false;
45 constexpr static inline const char* SupportedExtensions[] = {
"tgz",
"tar.gz",
"gz",
"zip",
"Z",
"gzip",
"tar" };
48 std::filesystem::path m_path;
49 std::string m_extractionDirectory;
50 bool m_bExtractLzmaInProc =
false;
51 bool m_bExtractLzmaUsing7Zip =
true;
53 bool ExtractLzmaOutOfProc(
const std::filesystem::path& destinationPath);
54 bool ExtractLzmaInProc(
const std::filesystem::path& destinationPath);
56 static inline const std::vector<std::string> LZMA_FILE_EXTENSIONS = {
".Z",
".z",
".lzma",
".lz" };