#pragma once #include #include #include #include #include namespace utils { std::string read_file(const char *filename) { std::ifstream in(filename, std::ios::in | std::ios::binary); if (in) return std::string(std::istreambuf_iterator(in), std::istreambuf_iterator()); throw(errno); } void write_file(const std::string& content, const std::string& path) { std::ofstream stream; stream.open(path.c_str()); stream << content; stream.close(); } }