| 531 | } |
| 532 | |
| 533 | bool SaveWriter::WriteFile(const char *filename, const byte *data, size_t size) |
| 534 | { |
| 535 | const std::string path = dir_ + filename; |
| 536 | FILE *file = OpenFile(path.c_str(), "wb"); |
| 537 | if (file == nullptr) { |
| 538 | return false; |
| 539 | } |
| 540 | if (std::fwrite(data, size, 1, file) != 1) { |
| 541 | std::fclose(file); |
| 542 | return false; |
| 543 | } |
| 544 | std::fclose(file); |
| 545 | return true; |
| 546 | } |
| 547 | |
| 548 | void SaveWriter::RemoveHashEntries(bool (*fnGetName)(uint8_t, char *)) |
| 549 | { |
no test coverage detected