@refclone/refclone
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

@refclone/refclone

npm version Build Status

Copy-on-write file cloning for Node.js, powered by the 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 @refclone/refclone using your favorite package manager:

pnpm add @refclone/refclone

Usage

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

TypeScript Usage

First, import the package:

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

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:

yarn install
yarn build
yarn test

/@refclone/refclone/

    Package Sidebar

    Install

    npm i @refclone/refclone

    Weekly Downloads

    0

    Version

    0.1.5

    License

    MIT

    Unpacked Size

    10.5 kB

    Total Files

    4

    Last publish

    Collaborators

    • ialdama