digestnamed

package
v0.0.0-...-04bfd92 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Report

type Report struct {
	// Passed files contain their digest in the filename
	Passed []string

	// Skipped files weren't checked because they matched an allowed pattern
	Skipped []string

	// Failed files don't contain a matching digest in the filename
	Failed []string

	// NonRegular files cannot be checked because opening them is probably unsafe
	NonRegular []string

	FileErrors map[string]error
}

type Scanner

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

func NewScanner

func NewScanner(skipPatterns []string) (Scanner, error)

func (Scanner) ScanDirectory

func (s Scanner) ScanDirectory(path string) (Report, error)

ScanDirectory checks that the files in a directory and its children are named based on their digest contents. This only returns an error if there was a problem traversing the directory and its children; any errors opening/reading files are reported in the Report instead.

Jump to

Keyboard shortcuts

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