dduper

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DDupe

func DDupe(fsys afero.Fs, dirPrefix string, printDupes bool) error

func DDupeCurrentDir

func DDupeCurrentDir(printDupes bool) error

DDupeCurrentDir wraps DDupe and passes in the current working directory. If you need to modify the directory scanned, use DDupe

func HashFile

func HashFile(f fs.File) (string, error)

HashFile generates a sha1 hash of a file

Types

type DupeScanResult

type DupeScanResult struct {
	FilesScanned int
	DupePaths    []string // list of files that are duplicates
}

func ScanForDupes

func ScanForDupes(fsys afero.Fs, dirPrefix string) (DupeScanResult, error)

ScanForDupes scans a folder recursively for duplicate files and returns a dupeScanResult containing all the duplicates found. The first file found is treated as the original and not included in the result

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL