Documentation
¶
Overview ¶
Package scanner finds files in a directory based on their extensions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindFiles ¶ added in v0.1.3
FindFiles walks a directory and returns all files matching the given extensions. Extensions should include the leading dot (e.g., ".md", ".json"). It skips hidden directories (starting with .) like .git.
func FindFilesByTypes ¶ added in v0.1.3
FindFilesByTypes walks a directory and returns all files matching the given type names. Type names are without the leading dot (e.g., "md", "json", "yaml"). It skips hidden directories (starting with .) like .git.
func FindFilesWithOptions ¶ added in v0.1.3
func FindFilesWithOptions(opts ScanOptions) ([]string, error)
FindFilesWithOptions scans for files with include/exclude filtering. This is the recommended function for scanning with full configuration support.
Types ¶
type ScanOptions ¶ added in v0.1.3
type ScanOptions struct {
// Root is the directory to scan.
Root string
// Types are the file types to include (e.g., "md", "json", "yaml").
Types []string
// Include patterns (glob) - if set, only matching files are included.
Include []string
// Exclude patterns (glob) - matching files are excluded.
Exclude []string
}
ScanOptions holds options for scanning files with filtering.