Help us shape the future of Go! Take the 2026 Go Developer Survey

scanner

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScanOptions

type ScanOptions struct {
	Recursive      bool
	IncludeHidden  bool
	FollowSymlinks bool
	Exclusions     []string                          // Names, patterns, or relative directories to skip
	IgnoreDirs     []string                          // Output directories being created by CHEST
	ClassifyFunc   func(filename, ext string) string // Optional: overrides built-in classifier
	ExtractDates   bool                              // Read embedded media dates when available
	// EnrichFunc optionally enriches a scanned file record after built-in
	// metadata detection, e.g. via external metadata plugins. It returns the
	// (possibly modified) file and true when it produced enrichment. Called
	// once per file; must be safe for concurrent use during recursive scans.
	EnrichFunc func(file models.File) (models.File, bool)
}

ScanOptions configures scanner behavior

type Scanner

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

Scanner traverses files in a directory

func New

func New(opts ScanOptions) *Scanner

New creates a new Scanner

func (*Scanner) Scan

func (s *Scanner) Scan(root string) ([]models.File, error)

Scan scans target directory according to options

Jump to

Keyboard shortcuts

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