| 234 | } |
| 235 | |
| 236 | long 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 |
no test coverage detected