Skip to content

pnpm/reflink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2223f06 · Dec 5, 2024

History

59 Commits
Oct 1, 2023
Dec 5, 2024
Nov 22, 2024
Nov 22, 2024
Oct 18, 2023
Jan 2, 2024
Nov 25, 2024
Nov 22, 2024
Oct 1, 2023
Nov 22, 2024
Nov 22, 2024
Nov 3, 2023
Oct 11, 2023
Nov 22, 2024
Nov 22, 2024
Oct 1, 2023
Nov 22, 2024
Nov 22, 2024
Nov 22, 2024
Dec 5, 2024
Oct 30, 2023
Nov 22, 2024
Oct 1, 2023
Oct 11, 2023

Repository files navigation

@reflink/reflink

npm version Build Status

Copy-on-write file cloning for Node.js, powered by NAPI-RS and built upon reflink-copy. This package supports a variety of platforms, including ARM and x86 architectures.

Supported Platforms

- Linux
- MacOS
- Windows (Server 2012+ and Windows Dev Drives)

Installation

Just install @reflink/reflink using your favorite package manager:

pnpm add @reflink/reflink

Usage

The package provides both synchronous and asynchronous methods to clone files.

TypeScript Usage

First, import the package:

import { reflinkFileSync, reflinkFile } from '@reflink/reflink';

Synchronous Method

reflinkFileSync('source.txt', 'destination.txt');

Asynchronous Method

await reflinkFile('source.txt', 'destination.txt');

Testing

This package is tested using vitest. You can run the tests locally using:

pnpm install
pnpm build
pnpm test