public class CopyDirectoryVisitor extends CountingPathVisitor
Constructor and Description |
---|
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 |
---|---|
FileVisitResult |
preVisitDirectory(Path directory,
BasicFileAttributes attributes) |
FileVisitResult |
visitFile(Path sourceFile,
BasicFileAttributes attributes) |
equals, getPathCounters, hashCode, postVisitDirectory, toString, updateFileCounters, withBigIntegerCounters, withLongCounters
visitFileFailed
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.public FileVisitResult preVisitDirectory(Path directory, BasicFileAttributes attributes) throws IOException
preVisitDirectory
in interface FileVisitor<Path>
preVisitDirectory
in class SimpleFileVisitor<Path>
IOException
public FileVisitResult visitFile(Path sourceFile, BasicFileAttributes attributes) throws IOException
visitFile
in interface FileVisitor<Path>
visitFile
in class CountingPathVisitor
IOException
Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.