Package org.duracloud.sync.walker
Class DirWalker
- java.lang.Object
-
- org.apache.commons.io.DirectoryWalker
-
- org.duracloud.sync.walker.DirWalker
-
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
RestartDirWalker
public class DirWalker extends org.apache.commons.io.DirectoryWalker implements Runnable
Handles the walking of a set of directory trees. Each file found in the tree is added to the changed file list. Any files found among the listed directories will also be added to the changed file list. This is the starting point for synchronization.
-
-
Field Summary
Fields Modifier and Type Field Description protected ChangedListchangedListprotected FileExclusionManagerfileExclusionManager
-
Constructor Summary
Constructors Modifier Constructor Description protectedDirWalker(List<File> filesAndDirs, FileExclusionManager fileExclusionManager)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetFilesCount()protected booleanhandleDirectory(File directory, int depth, Collection results)protected voidhandleFile(File file, int depth, Collection results)protected booleanhandleIsCancelled(File file, int depth, Collection results)voidrun()static DirWalkerstart(List<File> topDirs, FileExclusionManager fileExclusionManager)voidstopWalk()booleanwalkComplete()protected voidwalkDirs()
-
-
-
Field Detail
-
changedList
protected final ChangedList changedList
-
fileExclusionManager
protected FileExclusionManager fileExclusionManager
-
-
Constructor Detail
-
DirWalker
protected DirWalker(List<File> filesAndDirs, FileExclusionManager fileExclusionManager)
-
-
Method Detail
-
stopWalk
public void stopWalk()
-
walkDirs
protected void walkDirs()
-
handleDirectory
protected boolean handleDirectory(File directory, int depth, Collection results) throws IOException
- Overrides:
handleDirectoryin classorg.apache.commons.io.DirectoryWalker- Throws:
IOException
-
handleFile
protected void handleFile(File file, int depth, Collection results)
- Overrides:
handleFilein classorg.apache.commons.io.DirectoryWalker
-
handleIsCancelled
protected boolean handleIsCancelled(File file, int depth, Collection results) throws IOException
- Overrides:
handleIsCancelledin classorg.apache.commons.io.DirectoryWalker- Throws:
IOException
-
start
public static DirWalker start(List<File> topDirs, FileExclusionManager fileExclusionManager)
-
walkComplete
public boolean walkComplete()
-
getFilesCount
public int getFilesCount()
-
-