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
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.commons.io.DirectoryWalker
org.apache.commons.io.DirectoryWalker.CancelException -
Field Summary
Fields inherited from class org.duracloud.sync.walker.DirWalker
changedList, fileExclusionManager -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRestartDirWalker(List<File> topDirs, long lastBackup, FileExclusionManager fileExclusionManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected 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, walkCompleteMethods inherited from class org.apache.commons.io.DirectoryWalker
checkIfCancelled, filterDirectoryContents, handleCancelled, handleDirectoryEnd, handleDirectoryStart, handleEnd, handleRestricted, handleStart, walk
-
Constructor Details
-
RestartDirWalker
protected RestartDirWalker(List<File> topDirs, long lastBackup, FileExclusionManager fileExclusionManager)
-
-
Method Details
-
walkDirs
protected void walkDirs() -
handleFile
- Overrides:
handleFilein classDirWalker
-
handleDirectory
- Overrides:
handleDirectoryin classDirWalker
-
start
public static DirWalker start(List<File> topDirs, long lastBackup, FileExclusionManager fileExclusionManager)
-