public class CopyDirectoryVisitor extends CountingPathVisitor
CountingPathVisitor.AbstractBuilder<T,B extends CountingPathVisitor.AbstractBuilder<T,B>>, CountingPathVisitor.BuilderEMPTY_STRING_ARRAY| Constructor and Description |
|---|
CopyDirectoryVisitor(Counters.PathCounters pathCounter,
PathFilter fileFilter,
PathFilter dirFilter,
Path sourceDirectory,
Path targetDirectory,
CopyOption... copyOptions)
Constructs an instance that copies files matching the given file and directory filters.
|
CopyDirectoryVisitor(Counters.PathCounters pathCounter,
Path sourceDirectory,
Path targetDirectory,
CopyOption... copyOptions)
Constructs an instance that copies all files.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
copy(Path sourceFile,
Path targetFile)
Copies the sourceFile to the targetFile.
|
boolean |
equals(Object obj) |
CopyOption[] |
getCopyOptions()
Gets the copy options.
|
Path |
getSourceDirectory()
Gets the source directory.
|
Path |
getTargetDirectory()
Gets the target directory.
|
int |
hashCode() |
FileVisitResult |
preVisitDirectory(Path directory,
BasicFileAttributes attributes) |
FileVisitResult |
visitFile(Path sourceFile,
BasicFileAttributes attributes) |
accept, defaultDirectoryFilter, defaultDirectoryTransformer, defaultFileFilter, defaultPathCounters, getPathCounters, postVisitDirectory, toString, updateDirCounter, updateFileCounters, withBigIntegerCounters, withLongCountersvisitFileFailedpublic CopyDirectoryVisitor(Counters.PathCounters pathCounter, PathFilter fileFilter, PathFilter dirFilter, Path sourceDirectory, Path targetDirectory, CopyOption... copyOptions)
pathCounter - How to count visits.fileFilter - How to filter file paths.dirFilter - How to filter directory paths.sourceDirectory - The source directorytargetDirectory - The target directorycopyOptions - Specifies how the copying should be done.public CopyDirectoryVisitor(Counters.PathCounters pathCounter, Path sourceDirectory, Path targetDirectory, CopyOption... copyOptions)
pathCounter - How to count visits.sourceDirectory - The source directorytargetDirectory - The target directorycopyOptions - Specifies how the copying should be done.protected void copy(Path sourceFile, Path targetFile) throws IOException
sourceFile - the source file.targetFile - the target file.IOException - if an I/O error occurs.public boolean equals(Object obj)
equals in class CountingPathVisitorpublic CopyOption[] getCopyOptions()
public Path getSourceDirectory()
public Path getTargetDirectory()
public int hashCode()
hashCode in class CountingPathVisitorpublic FileVisitResult preVisitDirectory(Path directory, BasicFileAttributes attributes) throws IOException
preVisitDirectory in interface FileVisitor<Path>preVisitDirectory in class CountingPathVisitorIOExceptionpublic FileVisitResult visitFile(Path sourceFile, BasicFileAttributes attributes) throws IOException
visitFile in interface FileVisitor<Path>visitFile in class CountingPathVisitorIOException