| 197 | } |
| 198 | |
| 199 | std::unique_ptr<uint8_t[]> readString(const std::string& filepath) { |
| 200 | size_t size = 0; |
| 201 | auto data = readBinaryInternal(filepath, size, 1); |
| 202 | if (data == nullptr) { |
| 203 | return nullptr; |
| 204 | } |
| 205 | |
| 206 | data.get()[size] = 0; // Append null terminator |
| 207 | return data; |
| 208 | } |
| 209 | |
| 210 | bool writeString(const std::string& filepath, const std::string& content) { |
| 211 | std::ofstream fileStream(filepath); |
no test coverage detected