An open API service indexing awesome lists of open source software.

https://github.com/mattriley/node-duplicate-file-finder

Finds duplicate files across given directories without hashing.
https://github.com/mattriley/node-duplicate-file-finder

dedupe duplicate-files hashless javascript nodejs npm-package

Last synced: 5 months ago
JSON representation

Finds duplicate files across given directories without hashing.

Awesome Lists containing this project

README

        

<%- lib.renderOpening() %>

## Install

<%- await lib.renderCode('npm install duplicate-file-finder', '', 'https://www.npmjs.com/package/duplicate-file-finder'); %>

## Usage

```js
const { findDuplicates } = require('duplicate-file-finder');
const sourcePath = 'photos'; // defaults to current directory.
const searchPaths = ['more-photos', 'even-more-photos']; // defaults to empty.
const duplicates = findDuplicates({ sourcePath, searchPaths }).then(duplicates => {
// do something with duplicates.
});
```

`duplicates` is a data structure like:

```js
[
[
'photos/family.jpg',
'more-photos/copy-of-family.jpg',
'even-more-photos/another-copy-of-family.jpg'
],
[
'photos/pets.jpg',
'more-photos/copy-of-pets.jpg'
]
]
```

## Architecture

<%- await lib.renderModuleDiagram() %>