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

Function MNNWriteFile

source/core/MNNFileUtils.cpp:231–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231size_t MNNWriteFile(file_t file, void * buf, size_t bytes)
232{
233 if (file == INVALID_FILE || buf == nullptr) {
234 return 0;
235 }
236#if defined(WIN32) || defined(_WIN32) || defined(_WIN64) || defined(_MSC_VER)
237 DWORD writebytes = 0;
238 if (WriteFile(file, buf, bytes, &writebytes, NULL)) {
239 return writebytes;
240 } else {
241 return 0;
242 }
243#else
244 return write(file, buf, bytes);
245#endif
246}
247
248ErrorCode MNNSetFilePointer(file_t file, size_t offset)
249{

Callers 2

syncMethod · 0.85
runMethod · 0.85

Calls 1

writeFunction · 0.85

Tested by 1

runMethod · 0.68