* @brief Reads the contents of a file into a string. * * @param filePath The file path to read from. * @param str The string to read into. * @return true if the file was read successfully, false otherwise. */
| 327 | * @return true if the file was read successfully, false otherwise. |
| 328 | */ |
| 329 | inline static bool readFileToString(const std::string &filePath, std::string *str) |
| 330 | { |
| 331 | KittyIOFile f(filePath, O_RDONLY | O_CLOEXEC); |
| 332 | return f.open() && f.readToString(str); |
| 333 | } |
| 334 | |
| 335 | /** |
| 336 | * @brief Reads the contents of a file into a buffer. |
nothing calls this directly
no test coverage detected