From d31715526a89f6f66f08d60a4224dd2c1e01b427 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Mon, 21 Feb 2022 12:07:30 -0500 Subject: [PATCH] Add file::seek method --- engine/platform/include/file.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine/platform/include/file.hpp b/engine/platform/include/file.hpp index 4c3e503..13ca73a 100755 --- a/engine/platform/include/file.hpp +++ b/engine/platform/include/file.hpp @@ -41,6 +41,10 @@ namespace prism { fread(t, s == 0 ? sizeof(T) : s, 1, handle); } + void seek(const size_t s) { + fseek(handle, s, SEEK_CUR); + } + /// Reads a string. Assumes the length is an unsigned integer. void read_string(std::string& str) { unsigned int length = 0;