LeviLamina
Loading...
Searching...
No Matches
ZipUtils.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/deps/core/file/UnzipResult.h"
9#include "mc/deps/core/file/ZipResult.h"
10#include "mc/deps/core/string/BasicStackString.h"
11#include "mc/platform/Result.h"
12
13// auto generated forward declare list
14// clang-format off
15namespace Core { class PathView; }
16namespace Core { class Result; }
17namespace Core::ZipUtils { class UnzipSettings; }
18namespace Core::ZipUtils { class ZipProgress; }
19namespace Core::ZipUtils { class ZipSettings; }
20// clang-format on
21
22namespace Core::ZipUtils {
23// functions
24// NOLINTBEGIN
25MCNAPI ::Core::PathBuffer<::Core::BasicStackString<char, 1024>> _zipEncodedPathToUTF8(::Core::PathView path);
26
27MCNAPI bool
28exists(::Core::PathView zipPath, ::Core::PathView relativePath, ::Core::ZipUtils::UnzipSettings const& unzipSettings);
29
30MCNAPI bool getFilenames(
31 ::Core::PathView zipPath,
32 ::std::vector<::Core::PathBuffer<::std::string>>& result,
33 ::Core::ZipUtils::UnzipSettings const& unzipSettings
34);
35
36MCNAPI ::Core::ZipUtils::UnzipResult getTranslatedUnzipResult(int inputResult);
37
38MCNAPI ::Core::ZipUtils::ZipResult getTranslatedZipResult(int inputResult);
39
40MCNAPI ::Core::Result
41isFolderDepthValid(::Core::PathBuffer<::Core::BasicStackString<char, 1024>> const& filePath, uint64 maxFileDepth);
42
43MCNAPI ::Core::ZipUtils::UnzipResult unzipInTransaction(
44 ::Core::PathView zipInputPath,
45 ::Core::PathView outputFolderPath,
47 bool useLowMemMode,
48 ::Core::ZipUtils::UnzipSettings const& unzipSettings,
49 ::Bedrock::Result<void>& transactionCommitResult
50);
51
52MCNAPI ::Core::ZipUtils::UnzipResult unzipToFlatFile(
53 ::Core::PathView zipInputPath,
54 ::Core::PathView outputFolderPath,
56 ::Core::FileBufferingMode bufferMode,
57 ::Core::ZipUtils::UnzipSettings const& unzipSettings
58);
59
60MCNAPI ::Core::ZipUtils::ZipResult
61zip(::Core::PathView inputPathIn,
62 ::Core::PathView zipOutputPath,
64 bool useLowMemMode,
65 ::Core::ZipUtils::ZipSettings const& zipSettings);
66// NOLINTEND
67
68} // namespace Core::ZipUtils
Definition Result.h:9
Definition BasicStackString.h:8
Definition PathBuffer.h:8
Definition PathView.h:15
Definition UnzipSettings.h:7
Definition ZipProgress.h:7
Definition ZipSettings.h:7
Definition zip.h:5