public class MoveVisitor extends SimpleFileVisitor<Path>
Constructor and Description |
---|
MoveVisitor(Path source,
Path target,
CopyOption... copyOptions)
构造
|
Modifier and Type | Method and Description |
---|---|
FileVisitResult |
preVisitDirectory(Path dir,
BasicFileAttributes attrs) |
FileVisitResult |
visitFile(Path file,
BasicFileAttributes attrs) |
postVisitDirectory, visitFileFailed
public MoveVisitor(Path source, Path target, CopyOption... copyOptions)
source
- 源Pathtarget
- 目标PathcopyOptions
- 拷贝(移动)选项public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException
preVisitDirectory
in interface FileVisitor<Path>
preVisitDirectory
in class SimpleFileVisitor<Path>
IOException
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException
visitFile
in interface FileVisitor<Path>
visitFile
in class SimpleFileVisitor<Path>
IOException
Copyright © 2024. All rights reserved.