MCPcopy
hub / github.com/docker/compose / PathMatcher

Interface PathMatcher

pkg/watch/notify.go:60–65  ·  pkg/watch/notify.go::PathMatcher

When we specify directories to watch, we often want to ignore some subset of the files under those directories. For example: - Watch /src/repo, but ignore /src/repo/.git - Watch /src/repo, but ignore everything in /src/repo/bazel-bin except /src/repo/bazel-bin/app-binary The PathMatcher interface

Source from the content-addressed store, hash-verified

58//
59// The PathMatcher interface helps us manage these ignores.
60type PathMatcher interface {
61 Matches(file string) (bool, error)
62
63 // If this matches the entire dir, we can often optimize filetree walks a bit.
64 MatchesEntireDir(file string) (bool, error)
65}
66
67// AnyMatcher is a PathMatcher to match any path
68type AnyMatcher struct{}

Callers 6

MatchesMethod · 0.65
TestEphemeralPathMatcherFunction · 0.65
MatchesMethod · 0.65
handleWatchBatchMethod · 0.65
shouldIgnoreFunction · 0.65
MatchesEntireDirMethod · 0.65

Implementers 4

AnyMatcherpkg/watch/notify.go
EmptyMatcherpkg/watch/notify.go
CompositePathMatcherpkg/watch/notify.go
dockerPathMatcherpkg/watch/dockerignore.go

Calls

no outgoing calls

Tested by

no test coverage detected