? CopyDirectoryVisitor
java.lang.Object
java.nio.file.SimpleFileVisitor<Path>
org.apache.commons.io.file.SimplePathVisitor
org.apache.commons.io.file.CountingPathVisitor
org.apache.commons.io.file.CopyDirectoryVisitor
- ????????:
FileVisitor<Path>
,PathVisitor
Copies a source directory to a target directory.
- ???????:
- 2.7
-
?????
????????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.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. -
????
??????????protected void
Copies the sourceFile to the targetFile.boolean
Gets the copy options.Gets the source directory.Gets the target directory.int
hashCode()
preVisitDirectory
(Path directory, BasicFileAttributes attributes) visitFile
(Path sourceFile, BasicFileAttributes attributes) ??????? org.apache.commons.io.file.CountingPathVisitor
getPathCounters, postVisitDirectory, toString, updateDirCounter, updateFileCounters, withBigIntegerCounters, withLongCounters
??????? java.nio.file.SimpleFileVisitor
visitFileFailed
???????? java.nio.file.FileVisitor
visitFileFailed
-
???????
-
CopyDirectoryVisitor
public 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.- ??:
pathCounter
- How to count visits.sourceDirectory
- The source directorytargetDirectory
- The target directorycopyOptions
- Specifies how the copying should be done.
-
CopyDirectoryVisitor
public 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.- ??:
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.- ???????:
- 2.9.0
-
-
??????
-
copy
Copies the sourceFile to the targetFile.- ??:
sourceFile
- the source file.targetFile
- the target file.- ??:
IOException
- if an I/O error occurs.- ???????:
- 2.8.0
-
equals
- ??:
equals
???CountingPathVisitor
-
getCopyOptions
Gets the copy options.- ??:
- the copy options.
- ???????:
- 2.8.0
-
getSourceDirectory
Gets the source directory.- ??:
- the source directory.
- ???????:
- 2.8.0
-
getTargetDirectory
Gets the target directory.- ??:
- the target directory.
- ???????:
- 2.8.0
-
hashCode
- ??:
hashCode
???CountingPathVisitor
-
preVisitDirectory
public FileVisitResult preVisitDirectory(Path directory, BasicFileAttributes attributes) throws IOException - ???:
preVisitDirectory
????FileVisitor<Path>
- ??:
preVisitDirectory
???CountingPathVisitor
- ??:
IOException
-
visitFile
public FileVisitResult visitFile(Path sourceFile, BasicFileAttributes attributes) throws IOException - ???:
visitFile
????FileVisitor<Path>
- ??:
visitFile
???CountingPathVisitor
- ??:
IOException
-