LeviLamina
Loading...
Searching...
No Matches
JournaledFile.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
9// auto generated forward declare list
10// clang-format off
11namespace Core { class FileOpenMode; }
12namespace Core { class Path; }
13namespace Core { class Result; }
14// clang-format on
15
17public:
18 // JournaledFile inner types define
19 enum class Progression : int {
20 NeverWritten = 0,
21 WriteFailed = 1,
22 WriteSuccess = 2,
23 };
24
25public:
26 // member variables
27 // NOLINTBEGIN
32 // NOLINTEND
33
34public:
35 // prevent constructor by default
36 JournaledFile& operator=(JournaledFile const&);
39
40public:
41 // member functions
42 // NOLINTBEGIN
43 MCAPI void _flushFiles();
44
45 MCAPI ::Core::Result close();
46
47 MCAPI ::Core::Result
48 open(::Core::Path filePath, ::Core::FileOpenMode fileOpenMode, ::Core::FileBufferingMode bufferingMode);
49
50 MCAPI ::Core::Result write(void const* pBuf, uint64 numBytes);
51
52 MCAPI ~JournaledFile();
53 // NOLINTEND
54
55public:
56 // static functions
57 // NOLINTBEGIN
58 MCAPI static ::Core::PathBuffer<::std::string> findBackupPath(::Core::Path fileName);
59
60 MCAPI static ::Core::PathBuffer<::std::string> findReadPath(::Core::Path fileName);
61
62 MCAPI static bool isOldFile(::Core::Path fileName);
63
64 MCAPI static void populateImportantFiles(::Core::Path fileName, ::std::vector<::std::string>& importantFiles);
65
66 MCAPI static ::Core::Result replaceHeadFileWithBackup(::Core::Path fileName);
67 // NOLINTEND
68
69public:
70 // destructor thunk
71 // NOLINTBEGIN
72 MCAPI void $dtor();
73 // NOLINTEND
74};
Definition FileOpenMode.h:7
Definition Path.h:15
Definition JournaledFile.h:16
Definition Path.h:16
Definition Result.h:6
Definition Alias.h:14