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

Function WriteFile

lobster/src/platform.cpp:335–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335bool WriteFile(string_view relfilename, bool binary, string_view contents) {
336 FILE *f = OpenForWriting(relfilename, binary);
337 size_t written = 0;
338 if (f) {
339 written = fwrite(contents.data(), contents.size(), 1, f);
340 fclose(f);
341 }
342 return written == 1;
343}
344
345bool FileExists(string_view relfilename) {
346 auto f = fopen(WriteFileName(relfilename).c_str(), "rb");

Callers 9

OnOutputMethod · 0.85
DumpLeaksMethod · 0.85
DumpBuiltinsFunction · 0.85
AddFileFunction · 0.85
DumpMethod · 0.85
SaveAsPLYMethod · 0.85
AddSteamFunction · 0.85
mainFunction · 0.85
OnOutputMethod · 0.85

Calls 3

OpenForWritingFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected