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 booleanprivate final PathMatcherprivate 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 currentFileSystempattern- the exclusion or inclusion patternexclude- flag to indicate if the givenpatternis an exclusion (true) or if it is an inclusion (false).
-
-
Method Details
-
isExclude
public boolean isExclude()- Returns:
trueif the givenpatternis an exclusion,falseif it is an exclude to an exclusion.
-
matches
- Specified by:
matchesin interfacePathMatcher- Parameters:
path- the path to match.- Returns:
trueif the givenpathstarts with the pattern or matches the pattern- See Also:
-
toString
-