MCPcopy Create free account
hub / github.com/alibaba/MNN / MNNCloseFile

Function MNNCloseFile

source/core/MNNFileUtils.cpp:133–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133ErrorCode MNNCloseFile(file_t file)
134{
135 if (file == INVALID_FILE) {
136 return FILE_NOT_EXIST;
137 }
138#if defined(WIN32) || defined(_WIN32) || defined(_WIN64) || defined(_MSC_VER)
139 if (!CloseHandle(file)) {
140 return FILE_CLOSE_FAILED;
141 }
142#else
143 if (-1 == close(file)) {
144 return FILE_CLOSE_FAILED;
145 }
146#endif
147 return NO_ERROR;
148}
149
150ErrorCode MNNRemoveFile(const char * file_name)
151{

Callers 11

mainFunction · 0.85
setPrefixCacheFileMethod · 0.85
completePrefixWriteMethod · 0.85
~ OpenCLMmapAllocatorMethod · 0.85
onExecuteMethod · 0.85
saveKVCacheInDiskMethod · 0.85
_cleanMethod · 0.85
removeKVCacheFileMethod · 0.85
~ MmapAllocatorMethod · 0.85
onReleaseMethod · 0.85
runMethod · 0.85

Calls 1

closeFunction · 0.85

Tested by 1

runMethod · 0.68