Package com.spotify.docker.client
Class CompressedDirectory.DockerIgnorePathMatcher
- java.lang.Object
-
- com.spotify.docker.client.CompressedDirectory.DockerIgnorePathMatcher
-
- All Implemented Interfaces:
java.nio.file.PathMatcher
- Enclosing class:
- CompressedDirectory
private static class CompressedDirectory.DockerIgnorePathMatcher extends java.lang.Object implements java.nio.file.PathMatcherA decorator for thePathMatcherwith 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
-
-
Constructor Summary
Constructors Constructor Description DockerIgnorePathMatcher(java.nio.file.FileSystem fileSystem, java.lang.String pattern, boolean exclude)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisExclude()booleanmatches(java.nio.file.Path path)java.lang.StringtoString()
-
-
-
Constructor Detail
-
DockerIgnorePathMatcher
public DockerIgnorePathMatcher(java.nio.file.FileSystem fileSystem, java.lang.String pattern, boolean exclude)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 Detail
-
isExclude
public boolean isExclude()
- Returns:
trueif the givenpatternis an exclusion,falseif it is an exclude to an exclusion.
-
matches
public boolean matches(java.nio.file.Path path)
- Specified by:
matchesin interfacejava.nio.file.PathMatcher- Parameters:
path- the path to match.- Returns:
trueif the givenpathstarts with the pattern or matches the pattern- See Also:
Path.startsWith(String),PathMatcher.matches(Path)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-