| 63 | } |
| 64 | |
| 65 | bool saveFile(const char *filePath, const char *buffer) { |
| 66 | std::ofstream outputFile(filePath); |
| 67 | if (outputFile.is_open()) { |
| 68 | outputFile << buffer; |
| 69 | std::cout << "Saved File : " << filePath |
| 70 | << ", Size : " << outputFile.tellp() << std::endl; |
| 71 | return true; |
| 72 | } else { |
| 73 | std::cerr << "Failed Save File" << std::endl; |
| 74 | return false; |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | std::string readFile(const char *filePath) { |
| 79 | std::ifstream inputFile(filePath); |
no outgoing calls