MCPcopy Create free account
hub / github.com/MJx0/KittyMemoryEx / writeToFile

Method writeToFile

KittyMemoryEx/KittyIOFile.hpp:308–312  ·  view source on GitHub ↗

* @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. */

Source from the content-addressed store, hash-verified

306 * @return true if the file was written successfully, false otherwise.
307 */
308 bool writeToFile(const std::string &filePath)
309 {
310 KittyIOFile f(filePath, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0666);
311 return f.open() && writeToFd(f.fd());
312 }
313
314 /**
315 * @brief Writes the contents of the file to a file descriptor.

Callers 1

copyMethod · 0.80

Calls 2

openMethod · 0.80
fdMethod · 0.80

Tested by

no test coverage detected