private static class CompressedDirectory.Visitor extends SimpleFileVisitor<Path>
| Modifier and Type | Field and Description |
|---|---|
private com.google.common.collect.ImmutableList<CompressedDirectory.DockerIgnorePathMatcher> |
ignoreMatchers |
private Path |
root |
private org.apache.commons.compress.archivers.tar.TarArchiveOutputStream |
tarStream |
| Modifier | Constructor and Description |
|---|---|
private |
Visitor(Path root,
com.google.common.collect.ImmutableList<CompressedDirectory.DockerIgnorePathMatcher> ignoreMatchers,
org.apache.commons.compress.archivers.tar.TarArchiveOutputStream tarStream) |
| Modifier and Type | Method and Description |
|---|---|
private static boolean |
exclude(com.google.common.collect.ImmutableList<CompressedDirectory.DockerIgnorePathMatcher> matchers,
Path path)
Checks if any of the given
CompressedDirectory.DockerIgnorePathMatcher matches the given path |
private static int |
getFileMode(Path file) |
private static int |
getModeFromPermissions(boolean read,
boolean write,
boolean execute) |
private static int |
getPosixFileMode(Path file) |
private static boolean |
isPosixComplantFS() |
FileVisitResult |
visitFile(Path file,
BasicFileAttributes attrs) |
postVisitDirectory, preVisitDirectory, visitFileFailedprivate final Path root
private final com.google.common.collect.ImmutableList<CompressedDirectory.DockerIgnorePathMatcher> ignoreMatchers
private final org.apache.commons.compress.archivers.tar.TarArchiveOutputStream tarStream
private Visitor(Path root, com.google.common.collect.ImmutableList<CompressedDirectory.DockerIgnorePathMatcher> ignoreMatchers, org.apache.commons.compress.archivers.tar.TarArchiveOutputStream tarStream)
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException
visitFile in interface FileVisitor<Path>visitFile in class SimpleFileVisitor<Path>IOExceptionprivate static boolean exclude(com.google.common.collect.ImmutableList<CompressedDirectory.DockerIgnorePathMatcher> matchers, Path path)
CompressedDirectory.DockerIgnorePathMatcher matches the given pathmatchers - the CompressedDirectory.DockerIgnorePathMatcher to usepath - the path to matchtrue if the given path should be excluded, false otherwiseprivate static int getFileMode(Path file) throws IOException
IOExceptionprivate static boolean isPosixComplantFS()
private static int getPosixFileMode(Path file) throws IOException
IOExceptionprivate static int getModeFromPermissions(boolean read,
boolean write,
boolean execute)
Copyright © 2016. All rights reserved.