Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGitIgnoreMarkedFS ¶ added in v0.19.11
NewGitIgnoreMarkedFS creates a new FS that marks gitignored paths in Stat.GitIgnored. The returned FS still walks the full tree (to preserve negation semantics), but it leaves filtering decisions to the consumer.
func RootPath ¶
RootPath resolves p under root as continuity's fs.RootPath does, following symlinks within root. A path that holds no symlinks, the common case, is settled with one lookup where continuity's walk takes an lstat, and several allocations, per component; any other path is walked by continuity.
func RootPathWithoutSymlinks ¶
RootPathWithoutSymlinks settles, with one lookup, the common case of a path that holds no symlinks, which resolves to itself under root. A final symlink counts only when followFinalSymlink is set. ok is false when the lookup can't settle it: a symlink anywhere in the path, root's own components included, any error but a missing component, a ".." component, or a platform without the lookup. Every component before a missing one is a directory, and continuity's walk takes the missing ones as they are. Continuity takes a ".." after the symlinks before it, so cleaning it away first could change the answer.
Types ¶
type GitignoreMatcher ¶
type GitignoreMatcher struct {
// contains filtered or unexported fields
}
func NewGitIgnoreMatcher ¶
func NewGitIgnoreMatcher(fs fsutil.FS) *GitignoreMatcher
NewGitIgnoreMatcher creates a new GitignoreMatcher for the given FS
func NewGitIgnoreMatcherWithOverrides ¶
func NewGitIgnoreMatcherWithOverrides(fs fsutil.FS, overrides map[string]string) *GitignoreMatcher