LeviLamina
Loading...
Searching...
No Matches
IZipUtility.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/file/FileBufferingMode.h"
7#include "mc/deps/core/file/PathBuffer.h"
8#include "mc/platform/Result.h"
9
10// auto generated forward declare list
11// clang-format off
12namespace Core { class Path; }
13namespace Core { class PathView; }
14namespace Core::ZipUtils { class UnzipSettings; }
15namespace Core::ZipUtils { class ZipProgress; }
16namespace Core::ZipUtils { class ZipSettings; }
17// clang-format on
18
19namespace Core::ZipUtils {
20
22public:
23 // virtual functions
24 // NOLINTBEGIN
25 virtual ~IZipUtility() = default;
26
27 virtual ::Bedrock::Result<void>
28 zip(::Core::Path const& inputPath,
29 ::Core::Path const& zipOutputPath,
31 bool useLowMemMode,
32 ::Core::ZipUtils::ZipSettings const& zipSettings) const = 0;
33
34 virtual ::Bedrock::Result<void>
35 zip(::std::vector<::Core::PathBuffer<::std::string>> const& filesToZip,
36 ::Core::PathView zipOutputPath,
38 bool useLowMemMode,
39 ::std::function<::std::string(::Core::PathView)> overrideNameCallback,
40 ::Core::ZipUtils::ZipSettings const& zipSettings) const = 0;
41
42 virtual ::Bedrock::Result<void> zipFromZip(
43 ::Core::PathView zipInputPath,
44 ::Core::PathView zipInputSubPath,
45 ::Core::PathView zipOutputPath,
47 bool useLowMemMode,
48 ::Core::ZipUtils::ZipSettings const& zipSettings
49 ) const = 0;
50
51 virtual ::Bedrock::Result<void> unzipInTransaction(
52 ::Core::Path const& zipInputPath,
53 ::Core::Path const& outputFolderPath,
55 bool useLowMemMode,
56 ::Core::ZipUtils::UnzipSettings const& unzipSettings
57 ) const = 0;
58
59 virtual ::Bedrock::Result<void> unzipToFlatFile(
60 ::Core::Path const& zipInputPath,
61 ::Core::Path const& outputFolderPath,
63 ::Core::FileBufferingMode bufferMode,
64 ::Core::ZipUtils::UnzipSettings const& unzipSettings
65 ) const = 0;
66
67 virtual bool getFilenames(
68 ::Core::Path const& zipPath,
69 ::std::vector<::Core::PathBuffer<::std::string>>& result,
70 ::Core::ZipUtils::UnzipSettings const& unzipSettings
71 ) const = 0;
72
73 virtual bool exists(
74 ::Core::Path const& zipPath,
75 ::Core::Path const& filePath,
76 ::Core::ZipUtils::UnzipSettings const& unzipSettings
77 ) const = 0;
78 // NOLINTEND
79
80public:
81 // virtual function thunks
82 // NOLINTBEGIN
83
84 // NOLINTEND
85};
86
87} // namespace Core::ZipUtils
Definition PathBuffer.h:8
Definition PathView.h:19
Definition Path.h:17
Definition IZipUtility.h:21
Definition UnzipSettings.h:16
Definition ZipProgress.h:7
Definition ZipSettings.h:16