dupfind

package
v0.0.0-...-22f8728 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DupFinder

type DupFinder struct {
	// contains filtered or unexported fields
}

A DupFinder finds duplicate files.

func NewDupFinder

func NewDupFinder(options ...Option) *DupFinder

NewDupFinder returns a new *DupFinder with the given options.

func (*DupFinder) FindDuplicates

func (f *DupFinder) FindDuplicates() (map[string][]string, error)

func (*DupFinder) Statistics

func (f *DupFinder) Statistics() *Statistics

type Option

type Option func(*DupFinder)

An Option sets an option on a *DupFinder.

func WithChannelBufferCapacity

func WithChannelBufferCapacity(channelBufferCapacity int) Option

WithChannelBufferCapacity sets the buffer capacity between different components. Larger values increase performance by allowing different components to run at different speeds, at the expense of memory usage.

func WithErrorHandler

func WithErrorHandler(errorHandler func(error) error) Option

func WithRoots

func WithRoots(roots ...string) Option

WithRoots sets the roots.

func WithThreshold

func WithThreshold(threshold int) Option

WithThreshold sets the threshold.

type Statistics

type Statistics struct {
	Errors             uint64  `json:"errors"`
	DirEntries         uint64  `json:"dirEntries"`
	Files              uint64  `json:"files"`
	FilesOpened        uint64  `json:"filesOpened"`
	FilesOpenedPercent float64 `json:"filesOpenedPercent"`
	TotalBytes         uint64  `json:"totalBytes"`
	BytesHashed        uint64  `json:"bytesHashed"`
	BytesHashedPercent float64 `json:"bytesHashedPercent"`
}

Statistics contains various statistics.

Jump to

Keyboard shortcuts

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