fsdedupe

package module
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: Unlicense Imports: 10 Imported by: 0

README

fsdedupe

Go Reference Test

Utils to deduplicate local filesystem

go install github.com/mxmCherry/fsdedupe/cmd/fsdedupe@latest

find <SOMEDIR> -type f -not -path '*/.*' | fsdedupe symlink

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DedupeSymlink(ctx context.Context, filenames Iterator) error

DedupeSymlink deduplicates input filenames by symlinking files to the first-seen file by SHA512 content hash.

Types

type Iterator added in v0.0.5

type Iterator interface {
	Next() (string, error)
}

Iterator defines a string (filename) iterator. It is expected to return io.EOF on no more entries.

func Lines added in v0.0.5

func Lines(r io.Reader) Iterator

Lines is an Iterator-adapter for an io.Reader (os.Stdin etc). It strips leading/trailing whitespaces and skips empty lines.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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