# file-sync

> Synchronize two files based on hash differences

Latest version **0.0.2** (published 2014-02-13) · 0 weekly downloads

## Install

```sh
npm install file-sync
pnpm add file-sync
yarn add file-sync
bun add file-sync
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2014-02-13 |
| First published | 2013-12-26 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mark Williams |
| Maintainers | willmark |
| Keywords | hash, copy, sync, file copy |

## Links

- npm: https://www.npmjs.com/package/file-sync
- Repository: https://github.com/willmark/file-sync
- Issues: https://github.com/willmark/file-sync/issues
- npm.io page: https://npm.io/package/file-sync

## Dependencies (2)

- [vargs](https://npm.io/package/vargs.md) ~0.1.0
- [file-compare](https://npm.io/package/file-compare.md) ~0.0.1

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2014-02-13
- 0.0.1 — 2013-12-26

## README

file-sync
============

> Stability - 2 Unstable

Synchronize two files based on hash values

## API

````
sync(file1, file2, [algorithm], function(result))

Copies file1 to file2 if hash differs and callback function gets a boolean result 'true' on successful copy
Optional [algorithm] is a string indicator of the type of hash to use (ie. 'sha1', 'md5', etc.)
 * usage: sync(file1, file2, [algo], callback);
 * where:
 *    file1 - required string path to file 1
 *    file2 - required string path to file 2
 *    algo - option string algorithm for hash computation
 *    callback - required callaback(copied, err)
 *    where: 
 *       copied - boolean indicating if copy succeeded
 *       err - Error if there was a problem with the copy
````

---
_Source: https://npm.io/package/file-sync · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
