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:
- java.lang.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.
Nested classes/interfaces inherited from class org.apache.commons.io.DirectoryWalker |
org.apache.commons.io.DirectoryWalker.CancelException |
Constructor Summary |
protected |
RestartDirWalker(java.util.List<java.io.File> topDirs,
long lastBackup)
|
Method Summary |
protected boolean |
handleDirectory(java.io.File directory,
int depth,
java.util.Collection results)
|
protected void |
handleFile(java.io.File file,
int depth,
java.util.Collection results)
|
static DirWalker |
start(java.util.List<java.io.File> topDirs,
long lastBackup)
|
protected void |
walkDirs()
|
Methods inherited from class org.apache.commons.io.DirectoryWalker |
checkIfCancelled, handleCancelled, handleDirectoryEnd, handleDirectoryStart, handleEnd, handleIsCancelled, handleRestricted, handleStart, walk |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RestartDirWalker
protected RestartDirWalker(java.util.List<java.io.File> topDirs,
long lastBackup)
walkDirs
protected void walkDirs()
- Overrides:
walkDirs
in class DirWalker
handleFile
protected void handleFile(java.io.File file,
int depth,
java.util.Collection results)
- Overrides:
handleFile
in class DirWalker
handleDirectory
protected boolean handleDirectory(java.io.File directory,
int depth,
java.util.Collection results)
- Overrides:
handleDirectory
in class org.apache.commons.io.DirectoryWalker
start
public static DirWalker start(java.util.List<java.io.File> topDirs,
long lastBackup)
Copyright © 2009-2010 DuraSpace. All Rights Reserved.