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
16class JournaledFile {
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&);
37 JournaledFile(JournaledFile const&);
38 JournaledFile();
39
40public:
41 // member functions
42 // NOLINTBEGIN
43 MCNAPI explicit JournaledFile(::std::function<::Core::Result(::Core::Path)>&& validationCallback);
44
45 MCNAPI void _flushFiles();
46
47 MCNAPI ::Core::Result close();
48
49 MCNAPI ::Core::Result
50 open(::Core::Path filePath, ::Core::FileOpenMode fileOpenMode, ::Core::FileBufferingMode bufferingMode);
51
52 MCNAPI ::Core::Result write(void const* pBuf, uint64 numBytes);
53
55 // NOLINTEND
56
57public:
58 // static functions
59 // NOLINTBEGIN
60 MCNAPI static ::Core::PathBuffer<::std::string> findBackupPath(::Core::Path fileName);
61
62 MCNAPI static ::Core::PathBuffer<::std::string> findReadPath(::Core::Path fileName);
63
64 MCNAPI static bool isOldFile(::Core::Path fileName);
65
66 MCNAPI static void populateImportantFiles(::Core::Path fileName, ::std::vector<::std::string>& importantFiles);
67
68 MCNAPI static ::Core::Result replaceHeadFileWithBackup(::Core::Path fileName);
69 // NOLINTEND
70
71public:
72 // constructor thunks
73 // NOLINTBEGIN
74 MCNAPI void* $ctor(::std::function<::Core::Result(::Core::Path)>&& validationCallback);
75 // NOLINTEND
76
77public:
78 // destructor thunk
79 // NOLINTBEGIN
80 MCNAPI void $dtor();
81 // NOLINTEND
82};
Definition FileOpenMode.h:7
Definition Path.h:12
Definition Result.h:11
static MCAPI ::Core::Result replaceHeadFileWithBackup(::Core::Path fileName)
MCAPI JournaledFile(::std::function<::Core::Result(::Core::Path)> &&validationCallback)
MCAPI ~JournaledFile()
MCAPI void * $ctor(::std::function<::Core::Result(::Core::Path)> &&validationCallback)
MCAPI::Core::Result close()
MCAPI::Core::Result write(void const *pBuf, uint64 numBytes)
static MCAPI ::Core::PathBuffer<::std::string > findBackupPath(::Core::Path fileName)
MCAPI void _flushFiles()
MCAPI::Core::Result open(::Core::Path filePath, ::Core::FileOpenMode fileOpenMode, ::Core::FileBufferingMode bufferingMode)
static MCAPI ::Core::PathBuffer<::std::string > findReadPath(::Core::Path fileName)
static MCAPI bool isOldFile(::Core::Path fileName)
static MCAPI void populateImportantFiles(::Core::Path fileName, ::std::vector<::std::string > &importantFiles)
MCAPI void $dtor()
Definition Alias.h:14