| 677 | } |
| 678 | |
| 679 | bool deleteFile(const MMKVPath_t &path) { |
| 680 | auto filename = path.c_str(); |
| 681 | if (::unlink(filename) != 0) { |
| 682 | auto err = errno; |
| 683 | MMKVError("fail to delete file [%s], %d (%s)", filename, err, strerror(err)); |
| 684 | return false; |
| 685 | } |
| 686 | return true; |
| 687 | } |
| 688 | |
| 689 | #ifndef MMKV_APPLE |
| 690 | bool isDiskOfMMAPFileCorrupted(MemoryFile *file, bool &needReportReadFail) { |
no outgoing calls
no test coverage detected