| 26 | } |
| 27 | |
| 28 | bool 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected