private static class CompressedDirectory.DockerIgnorePathMatcher extends Object implements PathMatcher
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| Modifier and Type | Field and Description |
|---|---|
private boolean |
exclude |
private PathMatcher |
matcher |
private String |
pattern |
| Constructor and Description |
|---|
DockerIgnorePathMatcher(FileSystem fileSystem,
String pattern,
boolean exclude)
Constructor.
|
private final String pattern
private final PathMatcher matcher
private final boolean exclude
public DockerIgnorePathMatcher(FileSystem fileSystem, String pattern, boolean exclude)
fileSystem - the current FileSystempattern - the exclusion or inclusion patternexclude - flag to indicate if the given pattern is an exclusion (
true) or if it is an inclusion (false).public boolean isExclude()
true if the given pattern is an exclusion, false if
it is an exclude to an exclusion.public boolean matches(Path path)
matches in interface PathMatcherpath - the path to matchtrue if the given path starts with the pattern or matches the
patternPath.startsWith(String),
PathMatcher.matches(Path)Copyright © 2016. All rights reserved.