Package org.duracloud.sync.walker
Class RestartDirWalker
- java.lang.Object
-
- org.apache.commons.io.DirectoryWalker
-
- org.duracloud.sync.walker.DirWalker
-
- org.duracloud.sync.walker.RestartDirWalker
-
- All Implemented Interfaces:
Runnable
public class RestartDirWalker extends DirWalker
Walks a set of directory trees just like a DirWalker, but only adds files to the changed list if their modified date is more recent than the time of the last backup. This provides a listing of files which have been added or updated since the last backup. All files in directories which have changed are added to the changed list as well in order to handle the possibility of directory names having been changed.
-
-
Field Summary
-
Fields inherited from class org.duracloud.sync.walker.DirWalker
changedList, fileExclusionManager
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRestartDirWalker(List<File> topDirs, long lastBackup, FileExclusionManager fileExclusionManager)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanhandleDirectory(File directory, int depth, Collection results)protected voidhandleFile(File file, int depth, Collection results)static DirWalkerstart(List<File> topDirs, long lastBackup, FileExclusionManager fileExclusionManager)protected voidwalkDirs()-
Methods inherited from class org.duracloud.sync.walker.DirWalker
getFilesCount, handleIsCancelled, run, start, stopWalk, walkComplete
-
-
-
-
Constructor Detail
-
RestartDirWalker
protected RestartDirWalker(List<File> topDirs, long lastBackup, FileExclusionManager fileExclusionManager)
-
-
Method Detail
-
handleFile
protected void handleFile(File file, int depth, Collection results)
- Overrides:
handleFilein classDirWalker
-
handleDirectory
protected boolean handleDirectory(File directory, int depth, Collection results)
- Overrides:
handleDirectoryin classDirWalker
-
start
public static DirWalker start(List<File> topDirs, long lastBackup, FileExclusionManager fileExclusionManager)
-
-