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 // NOLINTEND
73
74public:
75 // member functions
76 // NOLINTBEGIN
78 ::Core::FileAccessType accessType,
79 ::std::shared_ptr<::Core::FileStorageArea> storageArea,
80 ::std::shared_ptr<::Core::FlatFileManifestTracker> manifestTracker
81 );
82
83 MCNAPI ::Core::Result
84 _makeFailureFromFileSystemResult(::std::error_code const& errorCode, char const* function, char const* fileContext);
85 // NOLINTEND
86
87public:
88 // constructor thunks
89 // NOLINTBEGIN
90 MCNAPI void* $ctor(
91 ::Core::FileAccessType accessType,
92 ::std::shared_ptr<::Core::FileStorageArea> storageArea,
93 ::std::shared_ptr<::Core::FlatFileManifestTracker> manifestTracker
94 );
95 // NOLINTEND
96
97public:
98 // virtual function thunks
99 // NOLINTBEGIN
100 MCNAPI ::Core::Result $_openFile(
101 ::std::unique_ptr<::Core::FileImpl>& uptFileOut,
102 ::Core::PathView filename,
103 ::Core::FileOpenMode fileOpenMode,
104 ::Core::FileBufferingMode bufferingMode
105 );
106
107 MCNAPI bool $_fileExists(::Core::PathView filePath);
108
109 MCNAPI ::Core::Result $_deleteFile(::Core::PathView path);
110
111 MCNAPI ::Core::Result $_getFileSize(::Core::PathView filePath, uint64* pFileSizeOut);
112
113 MCNAPI ::Core::Result $_renameFile(::Core::PathView sourceFilePath, ::Core::PathView targetFilePath);
114
115 MCNAPI ::Core::Result $_createOneDirectory(::Core::PathView directoryPath);
116
117 MCNAPI ::Core::Result $_deleteEmptyDirectory(::Core::PathView directoryPath);
118
119 MCNAPI bool $_directoryExists(::Core::PathView directoryPath);
120
121 MCNAPI ::Core::Result $_renameDirectory(::Core::PathView sourceDirectoryPath, ::Core::PathView targetDirectoryPath);
122
123 MCNAPI ::Core::Result $_iterateOverDirectory(
124 ::Core::PathView directoryPath,
125 ::Core::DirectoryIterationFlags flags,
127 );
128
130
131 MCNAPI ::Core::Result $_getLastModificationTime(::Core::PathView filePath, int64* pModificationTime);
132
133 MCNAPI ::Core::Result $_getEntryType(::Core::PathView entryPath, ::Core::FileType& fileTypeOut);
134
135 MCNAPI ::Core::Result $_copyTimeAndAccessRights(::Core::PathView sourceEntryPath, ::Core::PathView targetEntryPath);
136
137
138 // NOLINTEND
139
140public:
141 // vftables
142 // NOLINTBEGIN
143 MCNAPI static void** $vftable();
144 // NOLINTEND
145};
146
147} // namespace Core
Definition FileImpl.h:19
Definition FileOpenMode.h:7
Definition FileStorageArea.h:31
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:19
Definition Result.h:11
Definition function_ref.h:60
Definition DirectoryIterationItem.h:18