MCPcopy Create free account
hub / github.com/KhronosGroup/glTF-IBL-Sampler / writeFile

Method writeFile

lib/source/FileHelper.cpp:28–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28bool IBLLib::writeFile(const char* _path, const char* _data, size_t _bytes)
29{
30 FILE* file = fopen(_path, "wb");
31
32 if (file == nullptr)
33 {
34 printf("Failed to open file %s\n", _path);
35 return false;
36 }
37
38 // write the file
39 auto sizeWritten = fwrite(_data, sizeof(char), _bytes, file);
40 fclose(file);
41
42 return sizeWritten > 0u;
43}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected