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.PathMatcher
A decorator for thePathMatcher
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
-
-
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 boolean
isExclude()
boolean
matches(java.nio.file.Path path)
java.lang.String
toString()
-
-
-
Constructor Detail
-
DockerIgnorePathMatcher
public DockerIgnorePathMatcher(java.nio.file.FileSystem fileSystem, java.lang.String pattern, boolean exclude)
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 Detail
-
isExclude
public boolean isExclude()
- Returns:
true
if the givenpattern
is an exclusion,false
if it is an exclude to an exclusion.
-
matches
public boolean matches(java.nio.file.Path path)
- Specified by:
matches
in interfacejava.nio.file.PathMatcher
- Parameters:
path
- the path to match.- Returns:
true
if the givenpath
starts with the pattern or matches the pattern- See Also:
Path.startsWith(String)
,PathMatcher.matches(Path)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-