MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / save_file

Function save_file

src/lodepng.cpp:6056–6060  ·  view source on GitHub ↗

write given buffer to the file, overwriting the file, it doesn't append to it.*/

Source from the content-addressed store, hash-verified

6054
6055/*write given buffer to the file, overwriting the file, it doesn't append to it.*/
6056void save_file(const std::vector<unsigned char>& buffer, const std::string& filename)
6057{
6058 std::ofstream file(filename.c_str(), std::ios::out|std::ios::binary);
6059 file.write(buffer.empty() ? 0 : (char*)&buffer[0], std::streamsize(buffer.size()));
6060}
6061#endif //LODEPNG_COMPILE_DISK
6062
6063#ifdef LODEPNG_COMPILE_ZLIB

Callers 1

encodeFunction · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected