public class CopyDirectoryVisitor extends CountingPathVisitor
| Constructor and Description |
|---|
CopyDirectoryVisitor(Counters.PathCounters pathCounter,
PathFilter fileFilter,
PathFilter dirFilter,
Path sourceDirectory,
Path targetDirectory,
CopyOption... copyOptions)
Constructs a new visitor that deletes files except for the files and directories explicitly given.
|
CopyDirectoryVisitor(Counters.PathCounters pathCounter,
Path sourceDirectory,
Path targetDirectory,
CopyOption... copyOptions)
Constructs a new visitor that deletes files except for the files and directories explicitly given.
|
| 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) |
getPathCounters, postVisitDirectory, toString, updateDirCounter, updateFileCounters, withBigIntegerCounters, withLongCountersvisitFileFailedclone, finalize, getClass, notify, notifyAll, wait, wait, waitvisitFileFailedpublic 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.public 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.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 CountingPathVisitorIOExceptionCopyright © 2002–2021 The Apache Software Foundation. All rights reserved.