MCPcopy Create free account
hub / github.com/aardappel/lobster / WriteFile

Function WriteFile

dev/src/platform.cpp:403–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401}
402
403bool WriteFile(string_view filename, bool binary, string_view contents, bool allow_absolute) {
404 FILE *f = OpenForWriting(filename, binary, allow_absolute);
405 size_t written = 0;
406 if (f) {
407 written = fwrite(contents.data(), contents.size(), 1, f);
408 fclose(f);
409 }
410 return written == 1;
411}
412
413bool RenameFile(string_view oldfilename, string_view newfilename) {
414 int result = rename(SanitizePath(oldfilename).c_str(), SanitizePath(newfilename).c_str());

Callers 14

DumpLeaksMethod · 0.85
DumpStackTraceMemoryMethod · 0.85
DumpBuiltinNamesFunction · 0.85
DumpBuiltinDocFunction · 0.85
AddFileFunction · 0.85
DumpBinaryMethod · 0.85
SaveAsIQMFunction · 0.85
SaveMethod · 0.85
AddSteamFunction · 0.85
main.cppFile · 0.85
OnOutputMethod · 0.85
SDL_LogOutputFunction · 0.85

Calls 3

OpenForWritingFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected