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

Method getActualFileSize

Core/MemoryFile_Win32.cpp:95–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95size_t File::getActualFileSize() const {
96 size_t size = 0;
97 if (isFileValid()) {
98 mmkv::getFileSize(m_fd, size);
99 } else {
100 mmkv::getFileSize(m_path.c_str(), size);
101 }
102 return size;
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))

Callers 1

copyFileContentFunction · 0.45

Calls 3

getFileSizeFunction · 0.70
isFileValidFunction · 0.50
isFileValidMethod · 0.45

Tested by

no test coverage detected