* @brief Writes the contents of the file to another file. * * @param filePath The file path to write to. * @return true if the file was written successfully, false otherwise. */
| 306 | * @param str The string to read into. |
| 307 | * @return true if the file was read successfully, false otherwise. |
| 308 | */ |
| 309 | inline static bool readFileToString(const std::string &filePath, std::string *str) |
| 310 | { |
| 311 | KittyIOFile f(filePath, O_RDONLY | O_CLOEXEC); |
| 312 | return f.open() && f.readToString(str); |
| 313 | } |
| 314 | |
| 315 | /** |