* @brief Reads the contents of a file into a buffer. * * @param filePath The file path to read from. * @param buf The buffer to read into. * @return true if the file was read successfully, false otherwise. */
| 340 | * @return true if the file was read successfully, false otherwise. |
| 341 | */ |
| 342 | inline static bool readFileToBuffer(const std::string &filePath, std::vector<char> *buf) |
| 343 | { |
| 344 | KittyIOFile f(filePath, O_RDONLY | O_CLOEXEC); |
| 345 | return f.open() && f.readToBuffer(buf); |
| 346 | } |
| 347 | |
| 348 | /** |
| 349 | * @brief Copies the contents of a file to another file. |
nothing calls this directly
no test coverage detected