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 MCAPI BasicFileData(::Core::PathBuffer<::std::string> const& path, uint64 size);
54
55 MCAPI ~BasicFileData();
56 // NOLINTEND
57
58 public:
59 // constructor thunks
60 // NOLINTBEGIN
61 MCAPI void* $ctor(::Core::PathBuffer<::std::string> const& path, uint64 size);
62 // NOLINTEND
63
64 public:
65 // destructor thunk
66 // NOLINTBEGIN
67 MCFOLD 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 getFileSize(::Core::PathView, uint64*) = 0;
102
103 // vIndex: 5
104 virtual ::Core::Result renameFile(::Core::PathView, ::Core::PathView) = 0;
105
106 // vIndex: 6
107 virtual ::Core::Result createEmptyFile(::Core::PathView) = 0;
108
109 // vIndex: 7
110 virtual ::Core::Result copyFile(::Core::PathView, ::Core::PathView) = 0;
111
112 // vIndex: 8
113 virtual ::Core::Result copyFileWithLimit(::Core::PathView, ::Core::PathView) = 0;
114
115 // vIndex: 9
116 virtual ::Core::Result readFileData(::Core::PathView, ::std::vector<uchar>&) = 0;
117
118 // vIndex: 10
119 virtual ::Core::Result createOneDirectory(::Core::PathView) = 0;
120
121 // vIndex: 11
122 virtual ::Core::Result createOneDirectoryIfNotExisting(::Core::PathView) = 0;
123
124 // vIndex: 12
125 virtual ::Core::Result createDirectoryRecursively(::Core::PathView) = 0;
126
127 // vIndex: 13
128 virtual bool directoryExists(::Core::PathView) = 0;
129
130 // vIndex: 14
131 virtual ::Core::Result deleteEmptyDirectory(::Core::PathView) = 0;
132
133 // vIndex: 15
134 virtual ::Core::Result deleteDirectoryAndContentsRecursively(::Core::PathView) = 0;
135
136 // vIndex: 16
137 virtual ::Core::Result deleteDirectoryContentsRecursively(::Core::PathView) = 0;
138
139 // vIndex: 17
140 virtual ::Core::Result renameDirectory(::Core::PathView, ::Core::PathView) = 0;
141
142 // vIndex: 18
143 virtual ::Core::Result
144 iterateOverDirectory(::Core::PathView, ::Core::DirectoryIterationFlags, ::brstd::function_ref<::Core::Result(::Core::DirectoryIterationItem const&)>) = 0;
145
146 // vIndex: 19
147 virtual ::Core::Result getDirectoryFiles(::std::vector<::Core::PathBuffer<::std::string>>&, ::Core::PathView) = 0;
148
149 // vIndex: 20
150 virtual ::Core::Result
151 getDirectoryFilesAndSizes(::std::vector<::Core::FileSystem::BasicFileData>&, ::Core::PathView) = 0;
152
153 // vIndex: 21
154 virtual ::Core::Result
155 getDirectoryFilesRecursively(::std::vector<::Core::PathBuffer<::std::string>>&, ::Core::PathView) = 0;
156
157 // vIndex: 22
158 virtual ::Core::Result getDirectoryFilesSizeRecursively(uint64&, ::Core::PathView) = 0;
159
160 // vIndex: 23
161 virtual ::Core::Result getDirectoryFilesAllocatedSizeRecursively(uint64&, uint64&, ::Core::PathView) = 0;
162
163 // vIndex: 24
164 virtual ::Core::Result copyDirectoryAndContentsRecursively(::Core::PathView, ::Core::PathView) = 0;
165
166 // vIndex: 25
167 virtual ::Core::Result copyDirectoryAndContentsRecursivelyWithLimit(::Core::PathView, ::Core::PathView) = 0;
168
169 // vIndex: 26
170 virtual bool isDirectoryPartiallyCopied(::Core::PathView) = 0;
171
172 // vIndex: 27
173 virtual bool fileOrDirectoryExists(::Core::PathView) = 0;
174
175 // vIndex: 28
176 virtual ::Core::Result getFileOrDirectorySize(::Core::PathView, uint64*) = 0;
177
178 // vIndex: 29
179 virtual ::Core::Result addIgnoredThrottlePath(::Core::PathView) = 0;
180
181 // vIndex: 30
182 virtual ::Core::Result removeIgnoredThrottlePath(::Core::PathView) = 0;
183
184 // vIndex: 31
185 virtual ::Core::Result isValidPath(::Core::PathView) = 0;
186
187 // vIndex: 32
188 virtual ::Core::Result getLastModificationTime(::Core::PathView, int64*) = 0;
189
190 // vIndex: 33
191 virtual ::Core::Result copyTimeAndAccessRights(::Core::PathView, ::Core::PathView) = 0;
192
193 // vIndex: 34
194 virtual ::Core::Result createFlatFile(::Core::PathView, ::Core::PathView) = 0;
195
196 // vIndex: 35
197 virtual bool isDirectoryPathAFlatFile(::Core::PathView) = 0;
198
199 // vIndex: 36
200 virtual ::Core::Result
201 copyFlatFile(::Core::PathView, ::Core::PathView, ::std::vector<::Core::ExcludedPath> const&, ::std::vector<::Core::ExcludedPath> const&) = 0;
202
203 // vIndex: 37
204 virtual ::Core::Result createDirectoryForFile(::Core::PathView) = 0;
205
206 // vIndex: 38
207 virtual ::Core::PathBuffer<::Core::BasicStackString<char, 1024>> getUniqueFilePathForFile(::Core::PathView) = 0;
208
209 // vIndex: 39
210 virtual ::Core::PathBuffer<::Core::BasicStackString<char, 1024>> getUniqueFilePathForDirectory(::Core::PathView
211 ) = 0;
212
213 // vIndex: 40
214 virtual ::Core::PathBuffer<::Core::BasicStackString<char, 1024>>
215 createUniquePathFromSeed(::Core::PathView, ::std::function<::std::string(int)>) = 0;
216
217 // vIndex: 41
218 virtual ::std::vector<::Core::PathBuffer<::std::string>> splitPathIntoFullPathSegments(::Core::PathView) = 0;
219
220 // vIndex: 42
221 virtual ::Core::Result readFileDataExt(::Core::PathView, uint64, uint64, ::std::vector<uchar>&, uint64&) = 0;
222
223 // vIndex: 43
224 virtual ::Core::Result
226
227 // vIndex: 44
228 virtual ::Core::Result
229 cleanPathSeparators_deprecated(::Core::PathBuffer<::Core::BasicStackString<char, 1024>>&, ::Core::PathView) = 0;
230
231 // vIndex: 45
232 virtual bool checkStorageCorrupt(::Core::PathView) = 0;
233
234 // vIndex: 46
235 virtual ::std::unique_ptr<::Core::FileSizePresetToken> presetFileInitialSize(::Core::PathView, uint64) = 0;
236
237 // vIndex: 47
238 virtual ::Core::Result
239 _getDirectoriesAndFileSizesRecursively(::Core::PathView, ::std::vector<::Core::PathBuffer<::std::string>>&, ::std::vector<::Core::FileSystem::BasicFileData>&) = 0;
240
241 // vIndex: 48
242 virtual ::Core::Result
243 _copyDirectoryStructure(::Core::PathView, ::Core::PathView, ::std::vector<::Core::PathBuffer<::std::string>> const&, ::Core::FileSystemImpl*) = 0;
244
245 // vIndex: 49
246 virtual ::Core::Result
247 _copyFilesWithLimit(::Core::PathView, ::Core::PathView, ::std::vector<::Core::FileSystem::BasicFileData>&, uint64&, uint64 const, ::std::function<::Core::Result(::Core::PathView, ::Core::PathView, ::Core::FileSystem::FileTransferProgress&)> const&) = 0;
248
249 // vIndex: 50
250 virtual ::Core::Result
251 _copyFlatFile(::Core::PathView, ::Core::PathView, ::std::vector<::Core::ExcludedPath> const&, ::std::vector<::Core::ExcludedPath> const&) = 0;
252
253 // vIndex: 51
254 virtual ::std::optional<uint64> _checkFileInitialSize(::Core::PathView) = 0;
255
256 // vIndex: 0
257 virtual ~FileSystem() /*override*/;
258 // NOLINTEND
259
260public:
261 // static functions
262 // NOLINTBEGIN
263 MCAPI static ::Core::FileSystem& get();
264 // NOLINTEND
265
266public:
267 // destructor thunk
268 // NOLINTBEGIN
269 MCFOLD void $dtor();
270 // NOLINTEND
271
272public:
273 // virtual function thunks
274 // NOLINTBEGIN
275
276 // NOLINTEND
277};
278
279} // namespace Core
Definition EnableNonOwnerReferences.h:7
Definition BasicStackString.h:8
Definition FileOpenMode.h:7
Definition FileSystemImpl.h:31
Definition FileSystem.h:27
Definition File.h:19
Definition PathBuffer.h:8
Definition PathView.h:16
Definition Result.h:17
Definition Result.h:6
Definition function_ref.h:60
Definition DirectoryIterationItem.h:15
Definition FileSystem.h:36
Definition FileSystem.h:71
Definition Alias.h:14