fshash

package
v0.0.0-...-ba6e549 Latest Latest
Warning

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

Go to latest
Published: May 25, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileList

type FileList []string

FileList is a just a list of file path list

func (FileList) Len

func (fm FileList) Len() int

Len returns the length of the file list

func (FileList) Less

func (fm FileList) Less(i, j int) bool

Less checks if i < j

func (FileList) Swap

func (fm FileList) Swap(i, j int)

Swap exchanges two values in the referenced list

type Map

type Map map[string]FileList

Map is mapping of file hashes to a list of files

func ReadPath

func ReadPath(args ReadPathArgs) Map

ReadPath crawls the file system from a specified path and creates a mapping SHA1 hashes to file paths

func (*Map) Sort

func (fl *Map) Sort()

Sort sorts the FileList functioning as map values

type ReadPathArgs

type ReadPathArgs struct {
	CurDepth    int
	Excludes    []string
	FPath       string
	FollowLinks bool
	MaxDepth    int
	Parallel    bool
	Sample      bool
	Verbose     bool
}

ReadPathArgs contains arguments for the ReadPath function

Jump to

Keyboard shortcuts

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