indexer

package
v0.0.0-...-2337eca Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashAll

func HashAll(root string) (map[string][sha512.Size]byte, error)

HashAll reads all the files in the file tree rooted at root and returns a map from file path to the SHA512 sum of the file's contents. If the directory walk fails or any read operation fails, HashAll returns an error. In that case, HashAll does not wait for inflight read operations to complete.

Types

type Indexer

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

File system indexer.

func New

func New(root string, excludes []string) *Indexer

Create a new indexer instance.

func (*Indexer) Index

func (idx *Indexer) Index() (map[string][sha512.Size]byte, error)

Index filesystem with content hashes.

Jump to

Keyboard shortcuts

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