Package org.mycore.datamodel.niofs.utils
Class MCRTreeCopier
java.lang.Object
org.mycore.datamodel.niofs.utils.MCRTreeCopier
- All Implemented Interfaces:
FileVisitor<Path>
Simple
FileVisitor
that recursive copies a directory- Author:
- Thomas Scheffler (yagee)
-
Constructor Summary
ConstructorDescriptionMCRTreeCopier
(Path source, Path target) MCRTreeCopier
(Path source, Path target, boolean renameOnExisting) MCRTreeCopier
(Path source, Path target, boolean renameOnExisting, boolean restartTransaction) -
Method Summary
Modifier and TypeMethodDescriptionpostVisitDirectory
(Path dir, IOException exc) preVisitDirectory
(Path dir, BasicFileAttributes attrs) visitFile
(Path file, BasicFileAttributes attrs) visitFileFailed
(Path file, IOException exc)
-
Constructor Details
-
MCRTreeCopier
- Throws:
NoSuchFileException
-
MCRTreeCopier
- Throws:
NoSuchFileException
-
MCRTreeCopier
public MCRTreeCopier(Path source, Path target, boolean renameOnExisting, boolean restartTransaction) throws NoSuchFileException - Throws:
NoSuchFileException
-
-
Method Details
-
preVisitDirectory
- Specified by:
preVisitDirectory
in interfaceFileVisitor<Path>
-
postVisitDirectory
- Specified by:
postVisitDirectory
in interfaceFileVisitor<Path>
-
visitFile
- Specified by:
visitFile
in interfaceFileVisitor<Path>
-
visitFileFailed
- Specified by:
visitFileFailed
in interfaceFileVisitor<Path>
-