Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileItem ¶
FileItem represents a file or directory found when walking the filesystem.
func WalkDirectory ¶
func WalkDirectory(root string, gitIgnore *GitIgnoreManager, filter *FilterManager, useGitIgnore, showHidden bool, maxFileSize int64) ([]FileItem, error)
WalkDirectory traverses the root directory taking into account gitignore, hidden files, and max file size.
type FilterManager ¶
type FilterManager struct {
Patterns []string
}
func NewFilterManager ¶
func NewFilterManager() *FilterManager
func (*FilterManager) AddGlobPattern ¶
func (f *FilterManager) AddGlobPattern(pattern string)
func (*FilterManager) ShouldInclude ¶
func (f *FilterManager) ShouldInclude(path string) bool
type GitIgnoreManager ¶
type GitIgnoreManager struct {
// contains filtered or unexported fields
}
GitIgnoreManager manages gitignore patterns for a repository.
func NewGitIgnoreManager ¶
func NewGitIgnoreManager(root string) (*GitIgnoreManager, error)
NewGitIgnoreManager reads the .gitignore file (if present) and returns a manager.
func (*GitIgnoreManager) IsIgnored ¶
func (g *GitIgnoreManager) IsIgnored(path string) bool
IsIgnored returns true if the provided path is ignored.
Click to show internal directories.
Click to hide internal directories.