public class BasicSyncFileVisitor
extends java.nio.file.SimpleFileVisitor<java.nio.file.Path>
| Constructor and Description |
|---|
BasicSyncFileVisitor(java.nio.file.Path sourceBasePath,
java.nio.file.Path targetBasePath,
boolean delete,
boolean recursive) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
added(java.nio.file.Path sourcePath,
java.nio.file.Path targetPath) |
protected void |
copyFailed(java.nio.file.Path sourcePath,
java.nio.file.Path targetPath,
java.lang.Exception e) |
protected void |
deleted(java.nio.file.Path targetPath) |
protected void |
deleteFailed(java.nio.file.Path targetPath,
java.lang.Exception e) |
protected void |
error(java.lang.Object obj,
java.lang.Throwable e)
Log error.
|
java.nio.file.Path |
getSourceBasePath() |
SyncResult<java.nio.file.Path> |
getSyncResult() |
java.nio.file.Path |
getTargetBasePath() |
protected boolean |
isTraceEnabled() |
protected void |
modified(java.nio.file.Path sourcePath,
java.nio.file.Path targetPath) |
java.nio.file.FileVisitResult |
postVisitDirectory(java.nio.file.Path sourceDir,
java.io.IOException exc) |
java.nio.file.FileVisitResult |
preVisitDirectory(java.nio.file.Path sourceDir,
java.nio.file.attribute.BasicFileAttributes attrs) |
protected boolean |
shouldOverwrite(java.nio.file.Path sourceFile,
java.nio.file.Path targetFile) |
protected boolean |
shouldOverwriteLaterSameSize(java.nio.file.Path sourceFile,
java.nio.file.Path targetFile) |
protected void |
trace(java.lang.Object obj) |
java.nio.file.FileVisitResult |
visitFile(java.nio.file.Path sourceFile,
java.nio.file.attribute.BasicFileAttributes attrs) |
public BasicSyncFileVisitor(java.nio.file.Path sourceBasePath,
java.nio.file.Path targetBasePath,
boolean delete,
boolean recursive)
public java.nio.file.FileVisitResult preVisitDirectory(java.nio.file.Path sourceDir,
java.nio.file.attribute.BasicFileAttributes attrs)
throws java.io.IOException
preVisitDirectory in interface java.nio.file.FileVisitor<java.nio.file.Path>preVisitDirectory in class java.nio.file.SimpleFileVisitor<java.nio.file.Path>java.io.IOExceptionpublic java.nio.file.FileVisitResult postVisitDirectory(java.nio.file.Path sourceDir,
java.io.IOException exc)
throws java.io.IOException
postVisitDirectory in interface java.nio.file.FileVisitor<java.nio.file.Path>postVisitDirectory in class java.nio.file.SimpleFileVisitor<java.nio.file.Path>java.io.IOExceptionpublic java.nio.file.FileVisitResult visitFile(java.nio.file.Path sourceFile,
java.nio.file.attribute.BasicFileAttributes attrs)
throws java.io.IOException
visitFile in interface java.nio.file.FileVisitor<java.nio.file.Path>visitFile in class java.nio.file.SimpleFileVisitor<java.nio.file.Path>java.io.IOExceptionprotected boolean shouldOverwrite(java.nio.file.Path sourceFile,
java.nio.file.Path targetFile)
throws java.io.IOException
java.io.IOExceptionprotected boolean shouldOverwriteLaterSameSize(java.nio.file.Path sourceFile,
java.nio.file.Path targetFile)
public java.nio.file.Path getSourceBasePath()
public java.nio.file.Path getTargetBasePath()
protected void added(java.nio.file.Path sourcePath,
java.nio.file.Path targetPath)
protected void modified(java.nio.file.Path sourcePath,
java.nio.file.Path targetPath)
protected void copyFailed(java.nio.file.Path sourcePath,
java.nio.file.Path targetPath,
java.lang.Exception e)
protected void deleted(java.nio.file.Path targetPath)
protected void deleteFailed(java.nio.file.Path targetPath,
java.lang.Exception e)
protected void error(java.lang.Object obj,
java.lang.Throwable e)
protected boolean isTraceEnabled()
protected void trace(java.lang.Object obj)
public SyncResult<java.nio.file.Path> getSyncResult()
Copyright © 2007–2020. All rights reserved.