#include #include #include namespace Io { std::vector FileReader::Read(const std::string& path) { std::ifstream f(path, std::ios::binary | std::ios::ate); if (!f) throw Domain::RelinkerException("Cannot open file: " + path); const std::streamsize size = f.tellg(); f.seekg(0); std::vector buf(static_cast(size)); if (!f.read(reinterpret_cast(buf.data()), size)) throw Domain::RelinkerException("Cannot read file: " + path); return buf; } }