Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildIndexInput ¶
type BuildIndexInput struct {
BaseDirs []string // Base directories to search (e.g., ["$HOME"])
ExcludePaths []string // Paths to skip entirely (e.g., ["~/repos", "~/.cache"])
Patterns []Pattern // Patterns to match
MaxDepth int // Maximum recursion depth (0 = unlimited)
FollowSymlinks bool // Whether to follow symbolic links
ProgressCallback func(processed int64) // Optional progress reporter
}
BuildIndexInput holds the input parameters for building a file index
type FileIndex ¶
type FileIndex struct {
// contains filtered or unexported fields
}
FileIndex holds the results of the file system scan
func BuildIndex ¶
func BuildIndex(ctx context.Context, input BuildIndexInput) (*FileIndex, error)
BuildIndex recursively scans directories and builds a file index with inline matching
func (*FileIndex) TotalFiles ¶
TotalFiles returns the total number of indexed files
type Pattern ¶
type Pattern struct {
Name string // Unique identifier for this pattern (e.g., "ssh_config")
Patterns []string // List of patterns to match (e.g., [".ssh/config", ".ssh/config.d/*"])
Type PatternType // Type of pattern matching
}
Pattern defines a file pattern to search for
type PatternType ¶
type PatternType string
PatternType defines the type of pattern matching to use
const ( PatternTypeGlob PatternType = "glob" PatternTypeExact PatternType = "exact" PatternTypeRegex PatternType = "regex" // Reserved for future use )
Click to show internal directories.
Click to hide internal directories.