Package de.uhilger.httpserver.cm
Class OrdnerBearbeiter
- java.lang.Object
-
- de.uhilger.httpserver.cm.FileTransporter
-
- de.uhilger.httpserver.cm.OrdnerBearbeiter
-
- All Implemented Interfaces:
FileVisitor
public class OrdnerBearbeiter extends FileTransporter implements FileVisitor
Ein FileVisitor zum Verschieben oder Kopieren ganzer Ordnerstrukturen mit Hilfe der Methode Files.walkFileTree von java.nio.
-
-
Constructor Summary
Constructors Constructor Description OrdnerBearbeiter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileVisitResult
postVisitDirectory(Object dir, IOException exc)
FileVisitResult
preVisitDirectory(Object dir, BasicFileAttributes attrs)
void
setOperation(int op)
OP_COPY oder OP_MOVEvoid
setTargetDir(Path targetDir)
FileVisitResult
visitFile(Object file, BasicFileAttributes attrs)
FileVisitResult
visitFileFailed(Object file, IOException exc)
-
Methods inherited from class de.uhilger.httpserver.cm.FileTransporter
getNewFileName
-
-
-
-
Method Detail
-
setTargetDir
public void setTargetDir(Path targetDir)
-
setOperation
public void setOperation(int op)
OP_COPY oder OP_MOVE- Parameters:
op
-
-
preVisitDirectory
public FileVisitResult preVisitDirectory(Object dir, BasicFileAttributes attrs) throws IOException
- Specified by:
preVisitDirectory
in interfaceFileVisitor
- Throws:
IOException
-
visitFile
public FileVisitResult visitFile(Object file, BasicFileAttributes attrs) throws IOException
- Specified by:
visitFile
in interfaceFileVisitor
- Throws:
IOException
-
visitFileFailed
public FileVisitResult visitFileFailed(Object file, IOException exc) throws IOException
- Specified by:
visitFileFailed
in interfaceFileVisitor
- Throws:
IOException
-
postVisitDirectory
public FileVisitResult postVisitDirectory(Object dir, IOException exc) throws IOException
- Specified by:
postVisitDirectory
in interfaceFileVisitor
- Throws:
IOException
-
-