agallochdavidi / rclonefile

The macOS API for creating copy on write clones of files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rclonefile

The macOS API for creating copy on write clones of files.

Description

This is a small wrapper around the clonefile API on macOS for cloning files using the APFS file system.

Usage

async/await

import { cloneFile } from "rclonefile";

await cloneFile("source/mario.txt", "target/mario-clone-txt");

Promise

import { cloneFile } from "rclonefile";

cloneFile("source/mario.txt", "target/mario-clone-txt").then(() => {
	// Success
})

Sync API

import { cloneFileSync } from "rclonefile";

cloneFileSync("source/mario.txt", "target/mario-clone-txt");

Links

About

The macOS API for creating copy on write clones of files

License:MIT License


Languages

Language:JavaScript 55.1%Language:TypeScript 28.4%Language:Rust 16.6%