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

Function getFileSize

Core/MemoryFile.cpp:428–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426#ifndef MMKV_APPLE
427
428bool getFileSize(int fd, size_t &size) {
429 struct stat st = {};
430 if (fstat(fd, &st) != -1) {
431 size = (size_t) st.st_size;
432 return true;
433 }
434 return false;
435}
436
437bool getFileSize(const char *path, size_t &size) {
438 struct stat st = {};

Callers 4

getActualFileSizeMethod · 0.70
reloadFromFileMethod · 0.70
copyFileContentFunction · 0.70
copyFileContentFunction · 0.70

Calls 2

closeFunction · 0.85
statClass · 0.70

Tested by

no test coverage detected