scanner

package
v0.0.1-beta6 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package scanner is responsible for walking a file hierarchy and writing to an ajfs database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultFileExcluder

func DefaultFileExcluder() file.MatchPathFn

Return the default file excluder.

Types

type Scanner

type Scanner struct {
	DirIncluder  file.MatchPathFn // Determine which directories should be walked
	FileIncluder file.MatchPathFn // Determine which files should be walked

	DirExcluder  file.MatchPathFn // Determine which directories should not be walked
	FileExcluder file.MatchPathFn // Determine which files should not be walked
}

Scanner is used to walk a file hierarchy, perform filtering and then to write to an ajfs database.

func NewScanner

func NewScanner() Scanner

Create a new scanner.

func (Scanner) Scan

func (s Scanner) Scan(ctx context.Context, dbf *db.DatabaseFile) error

Scan starts the file hierarchy traversal and will write the found path info objects to the database. dbf should be a newly created database db.CreateDatabase.

Jump to

Keyboard shortcuts

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