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

Function SaveFile

3rd_party/flatbuffers/src/util.cpp:112–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112bool SaveFile(const char *name, const char *buf, size_t len, bool binary) {
113 std::ofstream ofs(name, binary ? std::ofstream::binary : std::ofstream::out);
114 if (!ofs.is_open()) return false;
115 ofs.write(buf, len);
116 return !ofs.bad();
117}
118
119// We internally store paths in posix format ('/'). Paths supplied
120// by the user should go through PosixPath to ensure correct behavior

Callers 15

SaveTypeMethod · 0.70
generateMethod · 0.70
SaveTypeMethod · 0.70
GenerateTextFileFunction · 0.70
generateMethod · 0.70
generateMethod · 0.70
generateMethod · 0.70
SaveTypeMethod · 0.70
GenerateBinaryFunction · 0.70
generateMethod · 0.70
generateMethod · 0.70
SaveTypeMethod · 0.70

Calls 2

is_openMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected