MCPcopy Create free account
hub / github.com/DFHack/dfhack / save_file

Function save_file

depends/lodepng/lodepng.cpp:6284–6286  ·  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

6282
6283/*write given buffer to the file, overwriting the file, it doesn't append to it.*/
6284unsigned save_file(const std::vector<unsigned char>& buffer, const std::string& filename) {
6285 return lodepng_save_file(buffer.empty() ? 0 : &buffer[0], buffer.size(), filename.c_str());
6286}
6287#endif /* LODEPNG_COMPILE_DISK */
6288
6289#ifdef LODEPNG_COMPILE_ZLIB

Callers 1

encodeFunction · 0.70

Calls 4

lodepng_save_fileFunction · 0.85
c_strMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected