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

Method copy

KittyMemoryEx/KittyIOFile.hpp:355–359  ·  view source on GitHub ↗

* @brief Copies the contents of a file to another file. * * @param srcFilePath The source file path. * @param dstFilePath The destination file path. * @return true if the file was copied successfully, false otherwise. */

Source from the content-addressed store, hash-verified

353 * @return true if the file was copied successfully, false otherwise.
354 */
355 inline static bool copy(const std::string &srcFilePath, const std::string &dstFilePath)
356 {
357 KittyIOFile f(srcFilePath, O_RDONLY | O_CLOEXEC);
358 return f.open() && f.writeToFile(dstFilePath);
359 }
360
361 /**
362 * @brief Lists files in a directory.

Callers

nothing calls this directly

Calls 2

openMethod · 0.80
writeToFileMethod · 0.80

Tested by

no test coverage detected