| 264 | } |
| 265 | |
| 266 | void saveFile(const std::string& outpu_string, const std::string& output_file) |
| 267 | { |
| 268 | fs::path out_path(output_file); |
| 269 | |
| 270 | if (!fs::exists(out_path.parent_path())) |
| 271 | { |
| 272 | fs::create_directories(out_path.parent_path()); |
| 273 | } |
| 274 | std::fstream output_file_stream(output_file, std::ios_base::out); |
| 275 | |
| 276 | output_file_stream << outpu_string << std::endl; |
| 277 | output_file_stream.flush(); |
| 278 | output_file_stream.close(); |
| 279 | return; |
| 280 | } |
| 281 | |
| 282 | void replaceAll(std::string& resource_str, std::string sub_str, std::string new_str) |
| 283 | { |