LeviLamina
Loading...
Searching...
No Matches
FileSystem_windows.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/FileAccessType.h"
8#include "mc/deps/core/file/FileBufferingMode.h"
9#include "mc/deps/core/file/FileType.h"
10#include "mc/deps/core/file/file_system/FileSystemImpl.h"
11#include "mc/platform/brstd/function_ref.h"
12
13// auto generated forward declare list
14// clang-format off
15namespace Core { class FileImpl; }
16namespace Core { class FileOpenMode; }
17namespace Core { class FileStorageArea; }
18namespace Core { class FlatFileManifestTracker; }
19namespace Core { class PathView; }
20namespace Core { class Result; }
21namespace Core { struct DirectoryIterationItem; }
22// clang-format on
23
24namespace Core {
25
26class FileSystem_windows : public ::Core::FileSystemImpl {
27public:
28 // prevent constructor by default
29 FileSystem_windows();
30
31public:
32 // virtual functions
33 // NOLINTBEGIN
34 virtual ::Core::Result _openFile(
35 ::std::unique_ptr<::Core::FileImpl>& uptFileOut,
36 ::Core::PathView filename,
37 ::Core::FileOpenMode fileOpenMode,
38 ::Core::FileBufferingMode bufferingMode
39 ) /*override*/;
40
41 virtual bool _fileExists(::Core::PathView filePath) /*override*/;
42
43 virtual ::Core::Result _deleteFile(::Core::PathView path) /*override*/;
44
45 virtual ::Core::Result _getFileSize(::Core::PathView filePath, uint64* pFileSizeOut) /*override*/;
46
47 virtual ::Core::Result _renameFile(::Core::PathView sourceFilePath, ::Core::PathView targetFilePath) /*override*/;
48
49 virtual ::Core::Result _createOneDirectory(::Core::PathView directoryPath) /*override*/;
50
51 virtual ::Core::Result _deleteEmptyDirectory(::Core::PathView directoryPath) /*override*/;
52
53 virtual bool _directoryExists(::Core::PathView directoryPath) /*override*/;
54
55 virtual ::Core::Result
56 _renameDirectory(::Core::PathView sourceDirectoryPath, ::Core::PathView targetDirectoryPath) /*override*/;
57
58 virtual ::Core::Result _iterateOverDirectory(
59 ::Core::PathView directoryPath,
60 ::Core::DirectoryIterationFlags flags,
62 ) /*override*/;
63
64 virtual bool _fileOrDirectoryExists(::Core::PathView entryPath) /*override*/;
65
66 virtual ::Core::Result _getLastModificationTime(::Core::PathView filePath, int64* pModificationTime) /*override*/;
67
68 virtual ::Core::Result _getEntryType(::Core::PathView entryPath, ::Core::FileType& fileTypeOut) /*override*/;
69
70 virtual ::Core::Result
71 _copyTimeAndAccessRights(::Core::PathView sourceEntryPath, ::Core::PathView targetEntryPath) /*override*/;
72
73 virtual ~FileSystem_windows() /*override*/ = default;
74 // NOLINTEND
75
76public:
77 // member functions
78 // NOLINTBEGIN
80 ::Core::FileAccessType accessType,
81 ::std::shared_ptr<::Core::FileStorageArea> storageArea,
82 ::std::shared_ptr<::Core::FlatFileManifestTracker> manifestTracker
83 );
84
85 MCNAPI ::Core::Result
86 _makeFailureFromFileSystemResult(::std::error_code const& errorCode, char const* function, char const* fileContext);
87 // NOLINTEND
88
89public:
90 // constructor thunks
91 // NOLINTBEGIN
92 MCNAPI void* $ctor(
93 ::Core::FileAccessType accessType,
94 ::std::shared_ptr<::Core::FileStorageArea> storageArea,
95 ::std::shared_ptr<::Core::FlatFileManifestTracker> manifestTracker
96 );
97 // NOLINTEND
98
99public:
100 // virtual function thunks
101 // NOLINTBEGIN
102 MCNAPI ::Core::Result $_openFile(
103 ::std::unique_ptr<::Core::FileImpl>& uptFileOut,
104 ::Core::PathView filename,
105 ::Core::FileOpenMode fileOpenMode,
106 ::Core::FileBufferingMode bufferingMode
107 );
108
109 MCNAPI bool $_fileExists(::Core::PathView filePath);
110
111 MCNAPI ::Core::Result $_deleteFile(::Core::PathView path);
112
113 MCNAPI ::Core::Result $_getFileSize(::Core::PathView filePath, uint64* pFileSizeOut);
114
115 MCNAPI ::Core::Result $_renameFile(::Core::PathView sourceFilePath, ::Core::PathView targetFilePath);
116
117 MCNAPI ::Core::Result $_createOneDirectory(::Core::PathView directoryPath);
118
119 MCNAPI ::Core::Result $_deleteEmptyDirectory(::Core::PathView directoryPath);
120
121 MCNAPI bool $_directoryExists(::Core::PathView directoryPath);
122
123 MCNAPI ::Core::Result $_renameDirectory(::Core::PathView sourceDirectoryPath, ::Core::PathView targetDirectoryPath);
124
125 MCNAPI ::Core::Result $_iterateOverDirectory(
126 ::Core::PathView directoryPath,
127 ::Core::DirectoryIterationFlags flags,
129 );
130
132
133 MCNAPI ::Core::Result $_getLastModificationTime(::Core::PathView filePath, int64* pModificationTime);
134
135 MCNAPI ::Core::Result $_getEntryType(::Core::PathView entryPath, ::Core::FileType& fileTypeOut);
136
137 MCNAPI ::Core::Result $_copyTimeAndAccessRights(::Core::PathView sourceEntryPath, ::Core::PathView targetEntryPath);
138
139
140 // NOLINTEND
141
142public:
143 // vftables
144 // NOLINTBEGIN
145 MCNAPI static void** $vftable();
146 // NOLINTEND
147};
148
149} // namespace Core
Definition FileImpl.h:19
Definition FileOpenMode.h:7
Definition FileStorageArea.h:26
Definition FileSystemImpl.h:30
MCAPI::Core::Result $_deleteFile(::Core::PathView path)
MCAPI::Core::Result _makeFailureFromFileSystemResult(::std::error_code const &errorCode, char const *function, char const *fileContext)
MCAPI void * $ctor(::Core::FileAccessType accessType, ::std::shared_ptr<::Core::FileStorageArea > storageArea, ::std::shared_ptr<::Core::FlatFileManifestTracker > manifestTracker)
MCAPI bool $_directoryExists(::Core::PathView directoryPath)
MCAPI::Core::Result $_openFile(::std::unique_ptr<::Core::FileImpl > &uptFileOut, ::Core::PathView filename, ::Core::FileOpenMode fileOpenMode, ::Core::FileBufferingMode bufferingMode)
MCAPI::Core::Result $_getLastModificationTime(::Core::PathView filePath, int64 *pModificationTime)
MCAPI::Core::Result $_deleteEmptyDirectory(::Core::PathView directoryPath)
MCAPI::Core::Result $_renameDirectory(::Core::PathView sourceDirectoryPath, ::Core::PathView targetDirectoryPath)
MCAPI::Core::Result $_getEntryType(::Core::PathView entryPath, ::Core::FileType &fileTypeOut)
MCAPI bool $_fileOrDirectoryExists(::Core::PathView entryPath)
MCAPI::Core::Result $_getFileSize(::Core::PathView filePath, uint64 *pFileSizeOut)
MCAPI bool $_fileExists(::Core::PathView filePath)
static MCAPI void ** $vftable()
MCAPI::Core::Result $_createOneDirectory(::Core::PathView directoryPath)
MCAPI FileSystem_windows(::Core::FileAccessType accessType, ::std::shared_ptr<::Core::FileStorageArea > storageArea, ::std::shared_ptr<::Core::FlatFileManifestTracker > manifestTracker)
MCAPI::Core::Result $_copyTimeAndAccessRights(::Core::PathView sourceEntryPath, ::Core::PathView targetEntryPath)
MCAPI::Core::Result $_iterateOverDirectory(::Core::PathView directoryPath, ::Core::DirectoryIterationFlags flags, ::brstd::function_ref<::Core::Result(::Core::DirectoryIterationItem const &)> fx)
MCAPI::Core::Result $_renameFile(::Core::PathView sourceFilePath, ::Core::PathView targetFilePath)
Definition FlatFileManifestTracker.h:13
Definition PathView.h:17
Definition Result.h:11
Definition function_ref.h:60
Definition DirectoryIterationItem.h:12