Package com.spotify.docker.client
Class CompressedDirectory.DockerIgnorePathMatcher
java.lang.Object
com.spotify.docker.client.CompressedDirectory.DockerIgnorePathMatcher
- All Implemented Interfaces:
PathMatcher
- Enclosing class:
CompressedDirectory
private static class CompressedDirectory.DockerIgnorePathMatcher
extends Object
implements PathMatcher
A decorator for the
PathMatcher
with a type to determine if it is an exclusion pattern
or an exclude to an aforementioned exclusion.
See https://docs.docker.com/engine/reference/builder/#dockerignore-file-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
private final PathMatcher
private final String
-
Constructor Summary
ConstructorsConstructorDescriptionDockerIgnorePathMatcher
(FileSystem fileSystem, String pattern, boolean exclude) Constructor. -
Method Summary
-
Field Details
-
pattern
-
matcher
-
exclude
private final boolean exclude
-
-
Constructor Details
-
DockerIgnorePathMatcher
Constructor.- Parameters:
fileSystem
- the currentFileSystem
pattern
- the exclusion or inclusion patternexclude
- flag to indicate if the givenpattern
is an exclusion (true
) or if it is an inclusion (false
).
-
-
Method Details
-
isExclude
public boolean isExclude()- Returns:
true
if the givenpattern
is an exclusion,false
if it is an exclude to an exclusion.
-
matches
- Specified by:
matches
in interfacePathMatcher
- Parameters:
path
- the path to match.- Returns:
true
if the givenpath
starts with the pattern or matches the pattern- See Also:
-
toString
-