#include #include #include using namespace std; string getFileContent(const string& file) { ifstream fileStream(file, ios::in); if (not fileStream.fail()) { string lineinput, fullinput; while (getline(fileStream, lineinput)) { fullinput.append(lineinput += '\n'); } fileStream.close(); return fullinput; } else throw Yerbacon::Exception("Could not open \"" + file + "\" : " + generic_category().message(errno)); } void outputFileContent(const string& file, const string_view content) { ofstream outputFile (file, ofstream::out); outputFile << content; }