org.entityfs.util.dirdiff
Class DirectoryTreeSynchronizer
java.lang.Object
org.entityfs.util.dirdiff.DirectoryTreeDifferentiator
org.entityfs.util.dirdiff.DirectoryTreeSynchronizer
- All Implemented Interfaces:
- Runnable
public class DirectoryTreeSynchronizer
- extends DirectoryTreeDifferentiator
This is a version of the DirectoryTreeDifferentiator
that can be used
to synchronize the files and directories of a master directory hierarchy to a
target directory hierarchy. Using this class is equivalent to using the
DirectoryTreeDifferentiator
with the
DeleteUnmatchedTargetEntityStrategy
and the
CopyUnmatchedMasterEntityStrategy
strategies.
Run the synchronization by calling the DirectoryTreeDifferentiator.run()
method.
- Since:
- 1.0
- Author:
- Karl Gustafsson
- See Also:
DirectorySynchronizer
,
DirectoryTreeDifferentiator
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectoryTreeSynchronizer
public DirectoryTreeSynchronizer(DirectoryView master,
DirectoryView target)
throws NullPointerException
- Create a directory tree synchronizer with the default entity match
strategy
EntitySizeAndFileModificationTimeMatchStrategy
.
- Parameters:
master
- The master root directory.target
- The target root directory.
- Throws:
NullPointerException
- If any of the arguments is null
.
DirectoryTreeSynchronizer
public DirectoryTreeSynchronizer(DirectoryView master,
DirectoryView target,
EntityMatchStrategy ems)
throws NullPointerException
- Create a directory tree synchronizer with a custom entity match strategy.
- Parameters:
master
- The master root directory.target
- The target root directory.ems
- The entity match strategy.
- Throws:
NullPointerException
- If any of the arguments is null
.