| 171 | |
| 172 | |
| 173 | std::string read_file(const std::string& path) { |
| 174 | std::ifstream file(path); |
| 175 | if (!file.is_open()) { |
| 176 | std::cerr << "Could not open file: " << path << std::endl; |
| 177 | return ""; |
| 178 | } |
| 179 | std::stringstream buffer; |
| 180 | buffer << file.rdbuf(); // Read the file into the stringstream |
| 181 | return buffer.str(); |
| 182 | } |
| 183 | |
| 184 | |
| 185 | void write_file(std::string path, std::string data) { |