source

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectFiles

func CollectFiles(paths []string, filter FileFilter) ([]string, error)

CollectFiles walks the given paths and returns matching files based on the filter. Each path can be a file or directory. Directories are walked according to filter settings.

func IsDirectory

func IsDirectory(path string) bool

IsDirectory returns true if the given path is a directory.

func MatchesAnyPattern

func MatchesAnyPattern(name string, patterns []string) bool

MatchesAnyPattern returns true if the name matches any of the given glob patterns.

Types

type FileFilter

type FileFilter struct {
	IncludePatterns []string // Glob patterns to include (e.g. "*.py", "*.js")
	ExcludePatterns []string // Glob patterns to exclude (e.g. "*.pyc", "*_test.go")
	Recursive       bool     // Whether to recurse into subdirectories
}

FileFilter configures which files to include or exclude during collection.

Jump to

Keyboard shortcuts

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