Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AlwaysSkipDirs = []string{".git", ".cache", ".forgotten"}
AlwaysSkipDirs contains directories that are always skipped regardless of SkipHidden setting. These directories should never be indexed as they contain: - .git: Version control data (huge and constantly changing) - .cache: Our own cache directory - .forgotten: Soft-deleted files (prevents re-indexing)
Functions ¶
func ShouldSkip ¶
ShouldSkip checks if any path (file or directory) should be skipped. For directories, use isDir=true. For files, use isDir=false.
func ShouldSkipDir ¶
ShouldSkipDir checks if a directory should be skipped based on config. Always skips AlwaysSkipDirs regardless of SkipHidden setting.
func ShouldSkipFile ¶
ShouldSkipFile checks if a file should be skipped based on config. Does not check directory path - only the file itself.
Types ¶
type Config ¶
type Config struct {
SkipHidden bool // Skip hidden files/dirs (default: true)
SkipDirs []string // Directories to skip by name
SkipFiles []string // Files to skip by name
SkipExtensions []string // Extensions to skip (e.g., ".zip")
}
Config contains skip pattern configuration. This is passed to walker and watcher for consistent skip behavior.