| 54 | } |
| 55 | |
| 56 | static inline bool write_binary_file(const std::string & path, |
| 57 | const void * data, size_t bytes) { |
| 58 | std::ofstream f(path, std::ios::binary); |
| 59 | if (!f) return false; |
| 60 | if (bytes > 0) f.write((const char *)data, (std::streamsize)bytes); |
| 61 | return (bool)f; |
| 62 | } |
| 63 | |
| 64 | static inline bool read_binary_file_exact(const std::string & path, |
| 65 | void * data, size_t bytes) { |
no test coverage detected