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

Function getFileModifyTimeInMS

Core/MemoryFile_Android.cpp:236–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236long long getFileModifyTimeInMS(const char *path) {
237 if (!path) {
238 return -1;
239 }
240 struct stat soStat = {};
241 if (::stat(path, &soStat) < 0) {
242 MMKVError("fail to stat %s: %d(%s)", path, errno, strerror(errno));
243 return -1;
244 }
245 return timespec_to_ms(soStat.st_mtim);
246}
247
248#endif // MMKV_ANDROID

Callers 1

tryMigrateLegacyMMKVFileFunction · 0.85

Calls 2

timespec_to_msFunction · 0.85
statClass · 0.70

Tested by

no test coverage detected