public class FileCallbackLocalCopy extends java.lang.Object implements FileRemoteWalkerCallback
FileRemoteAccessor#walkFileTreeCheck(FileRemote, boolean, boolean, boolean, String, long, int, FileRemoteWalkerCallback)
to copy the content of a directory tree called in FileRemote#copyDirTreeTo(FileRemote, int, String, int, FileRemoteProgressEvData)
.SortedTreeWalkerCallback.Result
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
aborted |
(package private) byte[] |
buffer |
private FileRemoteWalkerCallback |
callbackUser |
private FileRemote |
dirDst |
private EventWithDst<FileRemoteProgressEvData,?> |
evBack
Event instance for user callback.
|
(package private) int |
mode |
private FileRemoteProgressEvData |
progress |
static java.lang.String |
sVersion
Version, history and license.
|
callbackTemplate
Constructor and Description |
---|
FileCallbackLocalCopy(FileRemote dirDstStart,
FileRemoteWalkerCallback callbackUser,
EventWithDst<FileRemoteProgressEvData,?> evBack)
Constructs an instance to execute a comparison of directory trees.
|
Modifier and Type | Method and Description |
---|---|
void |
finished(FileRemote startDir)
Invoked after finishing the walking through.
|
SortedTreeWalkerCallback.Result |
finishedParentNode(FileRemote file,
java.lang.Object oPath,
java.lang.Object oWalkInfo)
Checks whether all files are compared or whether there are alone files.
|
SortedTreeWalkerCallback.Result |
offerLeafNode(FileRemote file,
java.lang.Object info)
This method creates a new file in the current dst directory with the same name as the given file.
|
SortedTreeWalkerCallback.Result |
offerParentNode(FileRemote dir,
java.lang.Object oPath,
java.lang.Object filter)
Invoked on start on walking through a parent node which have children.
|
boolean |
shouldAborted()
Returns true if the tree walking should be terminated respectively aborted.
|
void |
start(FileRemote startDir,
FileRemoteCmdEventData co)
Invoked before start of a walk through the tree.
|
public static final java.lang.String sVersion
FileAccessorLocalJava7.WalkFileTreeVisitor.preVisitDirectory(Path, java.nio.file.attribute.BasicFileAttributes)
.
There the first level does not call the offerParentNode(FileRemote, Object, Object)
as general solution.
It was obviously while working on delete, should not delete the src directory itself,
then the bFirst was removed here (as another, but now seen as scratch, solution).
private FileRemote dirDst
private final EventWithDst<FileRemoteProgressEvData,?> evBack
private final FileRemoteProgressEvData progress
private final FileRemoteWalkerCallback callbackUser
int mode
byte[] buffer
boolean aborted
public FileCallbackLocalCopy(FileRemote dirDstStart, FileRemoteWalkerCallback callbackUser, EventWithDst<FileRemoteProgressEvData,?> evBack)
dir1
- dirDst
- evCallback
- maybe null, if given, this event will be sent to show the progression of the comparisonpublic void start(FileRemote startDir, FileRemoteCmdEventData co)
SortedTreeWalkerCallback
start
in interface SortedTreeWalkerCallback<FileRemote,FileRemoteCmdEventData>
public SortedTreeWalkerCallback.Result offerParentNode(FileRemote dir, java.lang.Object oPath, java.lang.Object filter)
SortedTreeWalkerCallback
#offerLeafNode(TypeNode)
is not invoked.offerParentNode
in interface SortedTreeWalkerCallback<FileRemote,FileRemoteCmdEventData>
oPath
- Specific data presentation of the nodefilter
- internal possible information about walking, depending on usage.public SortedTreeWalkerCallback.Result finishedParentNode(FileRemote file, java.lang.Object oPath, java.lang.Object oWalkInfo)
finishedParentNode
in interface SortedTreeWalkerCallback<FileRemote,FileRemoteCmdEventData>
file
- the node which was walked throughoPath
- Specific data presentation of the nodeoWalkInfo
- internal possible information about walking, depending on usage.public SortedTreeWalkerCallback.Result offerLeafNode(FileRemote file, java.lang.Object info)
offerLeafNode
in interface SortedTreeWalkerCallback<FileRemote,FileRemoteCmdEventData>
org.vishia.util.SortedTreeWalkerCallback#offerLeafNode(java.lang.Object)
public boolean shouldAborted()
SortedTreeWalkerCallback
shouldAborted
in interface SortedTreeWalkerCallback<FileRemote,FileRemoteCmdEventData>
public void finished(FileRemote startDir)
SortedTreeWalkerCallback
finished
in interface SortedTreeWalkerCallback<FileRemote,FileRemoteCmdEventData>