LeviLamina
Loading...
Searching...
No Matches
FileSystem.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/file/DirectoryIterationFlags.h"
7#include "mc/deps/core/file/FileBufferingMode.h"
8#include "mc/deps/core/file/PathBuffer.h"
9#include "mc/deps/core/string/BasicStackString.h"
10#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
11#include "mc/platform/brstd/function_ref.h"
12
13// auto generated forward declare list
14// clang-format off
15namespace Core { class File; }
16namespace Core { class FileOpenMode; }
17namespace Core { class FileSizePresetToken; }
18namespace Core { class FileSystemImpl; }
19namespace Core { class PathView; }
20namespace Core { class Result; }
21namespace Core { struct DirectoryIterationItem; }
22namespace Core { struct ExcludedPath; }
23// clang-format on
24
25namespace Core {
26
28public:
29 // FileSystem inner types declare
30 // clang-format off
31 struct BasicFileData;
33 // clang-format on
34
35 // FileSystem inner types define
37 public:
38 // member variables
39 // NOLINTBEGIN
42 // NOLINTEND
43
44 public:
45 // prevent constructor by default
46 BasicFileData& operator=(BasicFileData const&);
49
50 public:
51 // member functions
52 // NOLINTBEGIN
53 MCNAPI BasicFileData(::Core::PathBuffer<::std::string> const& path, uint64 size);
54
56 // NOLINTEND
57
58 public:
59 // constructor thunks
60 // NOLINTBEGIN
61 MCNAPI void* $ctor(::Core::PathBuffer<::std::string> const& path, uint64 size);
62 // NOLINTEND
63
64 public:
65 // destructor thunk
66 // NOLINTBEGIN
67 MCNAPI void $dtor();
68 // NOLINTEND
69 };
70
72 public:
73 // member variables
74 // NOLINTBEGIN
78 // NOLINTEND
79
80 public:
81 // prevent constructor by default
85 };
86
87public:
88 // virtual functions
89 // NOLINTBEGIN
90 // vIndex: 1
91 virtual ::Core::Result
92 openFile(::Core::PathView, ::Core::File&, ::Core::FileOpenMode, ::Core::FileBufferingMode) = 0;
93
94 // vIndex: 2
95 virtual bool fileExists(::Core::PathView) = 0;
96
97 // vIndex: 3
98 virtual ::Core::Result deleteFile(::Core::PathView) = 0;
99
100 // vIndex: 4
101 virtual ::Core::Result deleteFilePriority(::Core::PathView) = 0;
102
103 // vIndex: 5
104 virtual ::Core::Result getFileSize(::Core::PathView, uint64*) = 0;
105
106 // vIndex: 6
107 virtual ::Core::Result renameFile(::Core::PathView, ::Core::PathView) = 0;
108
109 // vIndex: 7
110 virtual ::Core::Result createEmptyFile(::Core::PathView) = 0;
111
112 // vIndex: 8
113 virtual ::Core::Result copyFile(::Core::PathView, ::Core::PathView) = 0;
114
115 // vIndex: 9
116 virtual ::Core::Result copyFileWithLimit(::Core::PathView, ::Core::PathView) = 0;
117
118 // vIndex: 10
119 virtual ::Core::Result readFileData(::Core::PathView, ::std::vector<uchar>&) = 0;
120
121 // vIndex: 11
122 virtual ::Core::Result createOneDirectory(::Core::PathView) = 0;
123
124 // vIndex: 12
125 virtual ::Core::Result createOneDirectoryIfNotExisting(::Core::PathView) = 0;
126
127 // vIndex: 13
128 virtual ::Core::Result createDirectoryRecursively(::Core::PathView) = 0;
129
130 // vIndex: 14
131 virtual bool directoryExists(::Core::PathView) = 0;
132
133 // vIndex: 15
134 virtual ::Core::Result deleteEmptyDirectory(::Core::PathView) = 0;
135
136 // vIndex: 16
137 virtual ::Core::Result deleteDirectoryAndContentsRecursively(::Core::PathView) = 0;
138
139 // vIndex: 17
140 virtual ::Core::Result deleteDirectoryContentsRecursively(::Core::PathView) = 0;
141
142 // vIndex: 18
143 virtual ::Core::Result renameDirectory(::Core::PathView, ::Core::PathView) = 0;
144
145 // vIndex: 19
146 virtual ::Core::Result iterateOverDirectory(
148 ::Core::DirectoryIterationFlags,
150 ) = 0;
151
152 // vIndex: 20
153 virtual ::Core::Result getDirectoryFiles(::std::vector<::Core::PathBuffer<::std::string>>&, ::Core::PathView) = 0;
154
155 // vIndex: 21
156 virtual ::Core::Result
157 getDirectoryFilesAndSizes(::std::vector<::Core::FileSystem::BasicFileData>&, ::Core::PathView) = 0;
158
159 // vIndex: 22
160 virtual ::Core::Result
161 getDirectoryFilesRecursively(::std::vector<::Core::PathBuffer<::std::string>>&, ::Core::PathView) = 0;
162
163 // vIndex: 23
164 virtual ::Core::Result getDirectoryFilesSizeRecursively(uint64&, ::Core::PathView) = 0;
165
166 // vIndex: 24
167 virtual ::Core::Result getDirectoryFilesAllocatedSizeRecursively(uint64&, uint64&, ::Core::PathView) = 0;
168
169 // vIndex: 25
170 virtual ::Core::Result copyDirectoryAndContentsRecursively(::Core::PathView, ::Core::PathView) = 0;
171
172 // vIndex: 26
173 virtual ::Core::Result copyDirectoryAndContentsRecursivelyWithLimit(::Core::PathView, ::Core::PathView) = 0;
174
175 // vIndex: 27
176 virtual bool isDirectoryPartiallyCopied(::Core::PathView) = 0;
177
178 // vIndex: 28
179 virtual bool fileOrDirectoryExists(::Core::PathView) = 0;
180
181 // vIndex: 29
182 virtual ::Core::Result getFileOrDirectorySize(::Core::PathView, uint64*) = 0;
183
184 // vIndex: 30
185 virtual ::Core::Result addIgnoredThrottlePath(::Core::PathView) = 0;
186
187 // vIndex: 31
188 virtual ::Core::Result removeIgnoredThrottlePath(::Core::PathView) = 0;
189
190 // vIndex: 32
191 virtual ::Core::Result isValidPath(::Core::PathView) = 0;
192
193 // vIndex: 33
194 virtual ::Core::Result getLastModificationTime(::Core::PathView, int64*) = 0;
195
196 // vIndex: 34
197 virtual ::Core::Result copyTimeAndAccessRights(::Core::PathView, ::Core::PathView) = 0;
198
199 // vIndex: 35
200 virtual ::Core::Result createFlatFile(::Core::PathView, ::Core::PathView) = 0;
201
202 // vIndex: 36
203 virtual bool isDirectoryPathAFlatFile(::Core::PathView) = 0;
204
205 // vIndex: 37
206 virtual ::Core::Result copyFlatFile(
209 ::std::vector<::Core::ExcludedPath> const&,
210 ::std::vector<::Core::ExcludedPath> const&
211 ) = 0;
212
213 // vIndex: 38
214 virtual ::Core::Result createDirectoryForFile(::Core::PathView) = 0;
215
216 // vIndex: 39
217 virtual ::Core::PathBuffer<::Core::BasicStackString<char, 1024>> getUniqueFilePathForFile(::Core::PathView) = 0;
218
219 // vIndex: 40
220 virtual ::Core::PathBuffer<::Core::BasicStackString<char, 1024>>
221 getUniqueFilePathForDirectory(::Core::PathView) = 0;
222
223 // vIndex: 41
224 virtual ::Core::PathBuffer<::Core::BasicStackString<char, 1024>>
225 createUniquePathFromSeed(::Core::PathView, ::std::function<::std::string(int)>) = 0;
226
227 // vIndex: 42
228 virtual ::std::vector<::Core::PathBuffer<::std::string>> splitPathIntoFullPathSegments(::Core::PathView) = 0;
229
230 // vIndex: 43
231 virtual ::Core::Result readFileDataExt(::Core::PathView, uint64, uint64, ::std::vector<uchar>&, uint64&) = 0;
232
233 // vIndex: 44
234 virtual ::Core::Result
236
237 // vIndex: 45
238 virtual ::Core::Result
239 cleanPathSeparators_deprecated(::Core::PathBuffer<::Core::BasicStackString<char, 1024>>&, ::Core::PathView) = 0;
240
241 // vIndex: 46
242 virtual bool checkStorageCorrupt(::Core::PathView) = 0;
243
244 // vIndex: 47
245 virtual ::std::unique_ptr<::Core::FileSizePresetToken> presetFileInitialSize(::Core::PathView, uint64) = 0;
246
247 // vIndex: 48
248 virtual ::Core::Result _getDirectoriesAndFileSizesRecursively(
250 ::std::vector<::Core::PathBuffer<::std::string>>&,
251 ::std::vector<::Core::FileSystem::BasicFileData>&
252 ) = 0;
253
254 // vIndex: 49
255 virtual ::Core::Result _copyDirectoryStructure(
258 ::std::vector<::Core::PathBuffer<::std::string>> const&,
260 ) = 0;
261
262 // vIndex: 50
263 virtual ::Core::Result _copyFilesWithLimit(
266 ::std::vector<::Core::FileSystem::BasicFileData>&,
267 uint64&,
268 uint64 const,
269 ::std::function<
271 ) = 0;
272
273 // vIndex: 51
274 virtual ::Core::Result _copyFlatFile(
277 ::std::vector<::Core::ExcludedPath> const&,
278 ::std::vector<::Core::ExcludedPath> const&
279 ) = 0;
280
281 // vIndex: 52
282 virtual ::std::optional<uint64> _checkFileInitialSize(::Core::PathView) = 0;
283
284 // vIndex: 0
285 virtual ~FileSystem() /*override*/;
286 // NOLINTEND
287
288public:
289 // static functions
290 // NOLINTBEGIN
291 MCNAPI static ::Core::FileSystem& get();
292 // NOLINTEND
293
294public:
295 // destructor thunk
296 // NOLINTBEGIN
297 MCNAPI void $dtor();
298 // NOLINTEND
299
300public:
301 // virtual function thunks
302 // NOLINTBEGIN
303
304 // NOLINTEND
305};
306
307} // namespace Core
Definition EnableNonOwnerReferences.h:7
Definition BasicStackString.h:8
Definition FileOpenMode.h:7
Definition FileSystemImpl.h:31
Definition FileSystem.h:27
static MCAPI ::Core::FileSystem & get()
MCAPI void $dtor()
Definition File.h:19
Definition PathBuffer.h:8
Definition PathView.h:16
Definition Result.h:13
Definition function_ref.h:60
Definition DirectoryIterationItem.h:15
Definition FileSystem.h:36
MCAPI BasicFileData(::Core::PathBuffer<::std::string > const &path, uint64 size)
MCAPI void * $ctor(::Core::PathBuffer<::std::string > const &path, uint64 size)
Definition FileSystem.h:71
Definition Alias.h:14