The macOS API for creating copy on write clones of files.
This is a small wrapper around the clonefile API on macOS for cloning files using the APFS file system.
import { cloneFile } from "rclonefile";
await cloneFile("source/mario.txt", "target/mario-clone-txt");
import { cloneFile } from "rclonefile";
cloneFile("source/mario.txt", "target/mario-clone-txt").then(() => {
// Success
})
import { cloneFileSync } from "rclonefile";
cloneFileSync("source/mario.txt", "target/mario-clone-txt");
- rclonefile-cli - CLI for this module
- clonefile(2) - Man page for system API