MCPcopy Create free account
hub / github.com/Tencent/MMKV / MemoryFile

Method MemoryFile

Core/MemoryFile_Win32.cpp:105–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105MemoryFile::MemoryFile(MMKVPath_t path, size_t expectedCapacity, bool readOnly, bool mayflyFD)
106 : m_diskFile(std::move(path), readOnly ? OpenFlag::ReadOnly : (OpenFlag::ReadWrite | OpenFlag::Create))
107 , m_fileMapping(nullptr)
108 , m_ptr(nullptr)
109 , m_size(0)
110 , m_readOnly(readOnly)
111 , m_isMayflyFD(mayflyFD) {
112 reloadFromFile(expectedCapacity);
113}
114
115bool MemoryFile::truncate(size_t size, FileLock *fileLock) {
116 if (m_isMayflyFD) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected