LeviLamina
Loading...
Searching...
No Matches
File.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#include "mc/deps/core/string/BasicStackString.h"
9
10// auto generated forward declare list
11// clang-format off
12namespace Core { class FileImpl; }
13namespace Core { class FileOpenMode; }
14namespace Core { class FileSystemImpl; }
15namespace Core { class PathView; }
16namespace Core { class Result; }
17namespace brstd { struct source_location; }
18// clang-format on
19
20namespace Core {
21
22class File {
23public:
24 // member variables
25 // NOLINTBEGIN
28 // NOLINTEND
29
30public:
31 // prevent constructor by default
32 File& operator=(File const&);
33 File(File const&);
34 File();
35
36public:
37 // member functions
38 // NOLINTBEGIN
39#ifdef LL_PLAT_C
40 MCNAPI File(::Core::File&& rhs);
41#endif
42
43 MCNAPI
44 File(::std::unique_ptr<::Core::FileImpl>&& uptFile, ::std::unique_ptr<::Core::FileSystemImpl>&& uptTransaction);
45
46 MCNAPI ::Core::Result close();
47
48#ifdef LL_PLAT_C
49 MCNAPI ::Core::Result flush();
50#endif
51
52 MCNAPI ::Core::Result getRemainingSize(uint64* pSize);
53
54 MCNAPI ::Core::Result getSize(uint64* pSize);
55
56#ifdef LL_PLAT_C
57 MCNAPI bool isNearTransactionLimit(uint64 windowSize) const;
58#endif
59
60 MCNAPI ::Core::Result
61 open(::Core::PathView fileName, ::Core::FileOpenMode openMode, ::Core::FileBufferingMode bufferingMode);
62
63 MCNAPI ::Core::File& operator=(::Core::File&& rhs);
64
65 MCNAPI ::Core::Result read(void* buf, uint64 numBytes, uint64* pNumBytesRead);
66
67 MCNAPI ::Core::Result readExactly(void* buf, uint64 numBytes);
68
69 MCNAPI void setLoggingEnabled(bool loggingEnabled);
70
71 MCNAPI ::Core::Result setPosition(uint64 position);
72
73 MCNAPI ::Core::Result write(void const* pBuf, uint64 numBytes);
74
75 MCNAPI ~File();
76 // NOLINTEND
77
78public:
79 // static functions
80 // NOLINTBEGIN
81#ifdef LL_PLAT_C
82 MCNAPI static ::Core::PathBuffer<::Core::BasicStackString<char, 1024>> cleanPath(::Core::PathView entryPath);
83#endif
84
85 MCNAPI static ::Core::Result writeCreateOrAppendFileData(
87 uint64 offset,
88 uint64 numBytesToWrite,
89 uchar const* buffer,
90 ::brstd::source_location sourceLocation
91 );
92 // NOLINTEND
93
94public:
95 // constructor thunks
96 // NOLINTBEGIN
97#ifdef LL_PLAT_C
98 MCNAPI void* $ctor(::Core::File&& rhs);
99#endif
100
101 MCNAPI void*
102 $ctor(::std::unique_ptr<::Core::FileImpl>&& uptFile, ::std::unique_ptr<::Core::FileSystemImpl>&& uptTransaction);
103 // NOLINTEND
104
105public:
106 // destructor thunk
107 // NOLINTBEGIN
108 MCNAPI void $dtor();
109 // NOLINTEND
110};
111
112} // namespace Core
Definition FileImpl.h:19
Definition FileOpenMode.h:7
Definition FileSystemImpl.h:30
Definition File.h:22
MCAPI::Core::File & operator=(::Core::File &&rhs)
MCAPI::Core::Result getSize(uint64 *pSize)
MCAPI::Core::Result close()
MCAPI void $dtor()
static MCAPI ::Core::Result writeCreateOrAppendFileData(::Core::PathView path, uint64 offset, uint64 numBytesToWrite, uchar const *buffer, ::brstd::source_location sourceLocation)
MCAPI::Core::Result write(void const *pBuf, uint64 numBytes)
MCAPI ~File()
MCAPI File(::std::unique_ptr<::Core::FileImpl > &&uptFile, ::std::unique_ptr<::Core::FileSystemImpl > &&uptTransaction)
MCAPI::Core::Result read(void *buf, uint64 numBytes, uint64 *pNumBytesRead)
MCAPI void * $ctor(::std::unique_ptr<::Core::FileImpl > &&uptFile, ::std::unique_ptr<::Core::FileSystemImpl > &&uptTransaction)
MCAPI::Core::Result readExactly(void *buf, uint64 numBytes)
MCAPI::Core::Result setPosition(uint64 position)
MCAPI::Core::Result getRemainingSize(uint64 *pSize)
MCAPI::Core::Result open(::Core::PathView fileName, ::Core::FileOpenMode openMode, ::Core::FileBufferingMode bufferingMode)
MCAPI void setLoggingEnabled(bool loggingEnabled)
Definition PathView.h:19
Definition Result.h:11
Definition source_location.h:7
Definition buffer.h:5
Definition Alias.h:14