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

Function deleteFile

Core/MemoryFile.cpp:679–687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

677}
678
679bool 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
690bool isDiskOfMMAPFileCorrupted(MemoryFile *file, bool &needReportReadFail) {

Callers 2

deleteOrRenameFileFunction · 0.70
removeStorageMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected