fsx

package
v1.9.19 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListDirectory

func ListDirectory(path string, maxDepth int, shouldIgnore func(string) bool) ([]string, error)

Types

type TreeNode

type TreeNode struct {
	Name     string      `json:"name"`
	Type     string      `json:"type"`
	Children []*TreeNode `json:"children,omitempty"`
}

func DirectoryTree

func DirectoryTree(path string, isPathAllowed func(string) error, shouldIgnore func(string) bool, maxDepth, currentDepth int) (*TreeNode, error)

type VCSMatcher added in v1.9.14

type VCSMatcher struct {
	// contains filtered or unexported fields
}

VCSMatcher handles VCS ignore pattern matching for a git repository

func NewVCSMatcher added in v1.9.14

func NewVCSMatcher(basePath string) (*VCSMatcher, error)

NewVCSMatcher creates a new VCS matcher for the given path. It searches for a git repository and loads .gitignore patterns. Returns (nil, nil) if no git repository is found - this is not an error.

func (*VCSMatcher) RepoRoot added in v1.9.14

func (m *VCSMatcher) RepoRoot() string

RepoRoot returns the repository root path for this matcher

func (*VCSMatcher) ShouldIgnore added in v1.9.14

func (m *VCSMatcher) ShouldIgnore(path string) bool

ShouldIgnore checks if a path should be ignored based on VCS rules. It checks both .git directories and .gitignore patterns.

Jump to

Keyboard shortcuts

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