MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / WriteFileData

Function WriteFileData

apps/tools/TcPbo/tc_pbo.cpp:175–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173
174#ifndef _WIN32
175static bool WriteFileData(const std::string& path, const void* data, size_t size)
176{
177 FILE* f = fopen(path.c_str(), "wb");
178 if (!f)
179 return false;
180 if (size > 0)
181 {
182 if (fwrite(data, 1, size, f) != size)
183 {
184 fclose(f);
185 return false;
186 }
187 }
188 fclose(f);
189 return true;
190}
191#endif
192
193extern "C"

Callers 1

ProcessFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected