{"id":18888366,"url":"https://github.com/pnpm/reflink","last_synced_at":"2025-04-14T23:20:38.822Z","repository":{"id":197805148,"uuid":"699005537","full_name":"pnpm/reflink","owner":"pnpm","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-05T12:35:25.000Z","size":1041,"stargazers_count":25,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-10T02:40:58.212Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pnpm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-10-01T16:37:10.000Z","updated_at":"2025-02-06T03:17:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"9b0cf60f-72c9-4575-b5ec-23d2e75d5deb","html_url":"https://github.com/pnpm/reflink","commit_stats":{"total_commits":50,"total_committers":1,"mean_commits":50.0,"dds":0.0,"last_synced_commit":"8416f1d2b786c4accb04f88d13870dc1fba036c2"},"previous_names":["nachoaldamav/cross-reflink","pnpm/reflink","pnpm/refclone"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnpm%2Freflink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnpm%2Freflink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnpm%2Freflink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnpm%2Freflink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pnpm","download_url":"https://codeload.github.com/pnpm/reflink/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248878207,"owners_count":21176294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T07:43:35.515Z","updated_at":"2025-04-14T23:20:38.783Z","avatar_url":"https://github.com/pnpm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @reflink/reflink\n\n[![npm version](https://badge.fury.io/js/%40reflink%2Freflink.svg)](https://www.npmjs.com/package/@reflink/reflink)\n[![Build Status](https://github.com/pnpm/reflink/workflows/CI/badge.svg)](https://github.com/pnpm/reflink/actions)\n\nCopy-on-write file cloning for Node.js, powered by NAPI-RS and built upon [reflink-copy](https://github.com/cargo-bins/reflink-copy). This package supports a variety of platforms, including ARM and x86 architectures.\n\n### Supported Platforms\n    - Linux\n    - MacOS\n    - Windows (Server 2012+ and Windows Dev Drives)\n\n## Installation\n\nJust install `@reflink/reflink` using your favorite package manager:\n\n```bash\npnpm add @reflink/reflink\n```\n\n## Usage\n\nThe package provides both synchronous and asynchronous methods to clone files.\n\n### TypeScript Usage\n\nFirst, import the package:\n\n```typescript\nimport { reflinkFileSync, reflinkFile } from '@reflink/reflink';\n```\n\n#### Synchronous Method\n\n```typescript\nreflinkFileSync('source.txt', 'destination.txt');\n```\n\n#### Asynchronous Method\n\n```typescript\nawait reflinkFile('source.txt', 'destination.txt');\n```\n\n## Testing\n\nThis package is tested using `vitest`. You can run the tests locally using:\n\n```bash\npnpm install\npnpm build\npnpm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpnpm%2Freflink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpnpm%2Freflink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpnpm%2Freflink/lists"}