filesystem

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package filesystem holds shared request/result types and gitignore helpers used by file tools. It is not a swappable capability: tools implement their own ops surface and only import these DTOs for grep/find/list formatting.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirEntry

type DirEntry struct {
	Name  string
	Path  string
	IsDir bool
}

type FindRequest

type FindRequest struct {
	Pattern    string
	Path       string
	MaxResults int
}

type FindResult

type FindResult struct {
	Paths     []string
	Truncated bool
	Text      string
	Hint      string
}

type GrepMatch

type GrepMatch struct {
	Path    string
	Line    int
	Content string
}

type GrepRequest

type GrepRequest struct {
	Pattern    string
	Path       string
	Glob       string
	IgnoreCase bool
	Literal    bool
	Context    int
	MaxMatches int
}

type GrepResult

type GrepResult struct {
	Matches   []GrepMatch
	Truncated bool
	Text      string
	Hint      string
}

type IgnoreMatcher added in v0.1.2

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

IgnoreMatcher applies .gitignore-style patterns relative to a workspace root.

func LoadIgnoreMatcher added in v0.1.2

func LoadIgnoreMatcher(workspaceRoot string) (*IgnoreMatcher, error)

LoadIgnoreMatcher reads the workspace-root .gitignore when present and always ignores .git, node_modules, and .env.

func (*IgnoreMatcher) Ignored added in v0.1.2

func (m *IgnoreMatcher) Ignored(relPath string, isDir bool) bool

Ignored reports whether relPath (slash-separated, relative to workspace root) should be skipped during directory walks.

Jump to

Keyboard shortcuts

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