patterns: Added basic file i/o functions

This commit is contained in:
WerWolv
2021-10-07 14:49:49 +02:00
parent 6d8b7bef09
commit a67263fa27
2 changed files with 133 additions and 1 deletions

View File

@@ -59,7 +59,9 @@ namespace hex {
if (getSize() == 0) return { };
return reinterpret_cast<char*>(readBytes(numBytes).data());
auto bytes = readBytes(numBytes);
return { reinterpret_cast<char*>(bytes.data()), bytes.size() };
}
void File::write(const u8 *buffer, size_t size) {