aboutsummaryrefslogtreecommitdiffstats
path: root/src/io_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/io_manager.cpp')
-rw-r--r--src/io_manager.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/io_manager.cpp b/src/io_manager.cpp
deleted file mode 100644
index 106dd248..00000000
--- a/src/io_manager.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "io_manager.hpp"
-
-#include <fstream>
-#include <stdexcept>
-
-bool IoManager::readFileToBuffer(const std::string &file_path, std::vector<unsigned char> &buffer)
-{
- std::ifstream file(file_path, std::ios::binary);
- if(!file.is_open())
- throw std::runtime_error("Could not open '"+file_path+"'");
-
- // seek to the end
- file.seekg(0, std::ios::end);
-
- // get the file size
- int file_size = file.tellg();
- file.seekg(0, std::ios::beg);
-
- // reduce file size by header bytes
- file_size -= file.tellg();
-
- buffer.resize(file_size);
- file.read((char *)&buffer[0], file_size);
- file.close();
-
- return true;
-}