org.kuali.kfs.sys.batch
Class FilePurgeDirectoryWalker
java.lang.Object
org.apache.commons.io.DirectoryWalker
org.kuali.kfs.sys.batch.FilePurgeDirectoryWalker
public class FilePurgeDirectoryWalker
- extends org.apache.commons.io.DirectoryWalker
A directory walker which finds files to purge; it's relatively simple, simply adding a file to
the given results if the IOFileMatcher has matched it
Nested classes/interfaces inherited from class org.apache.commons.io.DirectoryWalker |
org.apache.commons.io.DirectoryWalker.CancelException |
Constructor Summary |
FilePurgeDirectoryWalker(org.apache.commons.io.filefilter.IOFileFilter fileFilter)
Constructs a FilePurgeDirectoryWalker |
Methods inherited from class org.apache.commons.io.DirectoryWalker |
checkIfCancelled, filterDirectoryContents, handleCancelled, handleIsCancelled, handleRestricted, walk |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilePurgeDirectoryWalker
public FilePurgeDirectoryWalker(org.apache.commons.io.filefilter.IOFileFilter fileFilter)
- Constructs a FilePurgeDirectoryWalker
getFilesToPurge
public List<File> getFilesToPurge(String directory)
- See Also:
org.kuali.kfs.sys.batch.service.FilePurgeDirectoryWalker#getFilesToPurge(java.lang.String, java.util.List)
handleDirectory
protected boolean handleDirectory(File directory,
int depth,
Collection results)
throws IOException
- Overrides:
handleDirectory
in class org.apache.commons.io.DirectoryWalker
- Throws:
IOException
- See Also:
DirectoryWalker.handleDirectory(java.io.File, int, java.util.Collection)
getLastSubDirectoryName
protected String getLastSubDirectoryName(String directoryName)
- Finds the last subdirectory name of the given directory name and returns it
- Parameters:
directoryName
- a directory name with a sub directory
- Returns:
- the last subdirectory name
handleDirectoryEnd
protected void handleDirectoryEnd(File directory,
int depth,
Collection results)
throws IOException
- Overrides:
handleDirectoryEnd
in class org.apache.commons.io.DirectoryWalker
- Throws:
IOException
- See Also:
DirectoryWalker.handleDirectoryEnd(java.io.File, int, java.util.Collection)
handleDirectoryStart
protected void handleDirectoryStart(File directory,
int depth,
Collection results)
throws IOException
- Overrides:
handleDirectoryStart
in class org.apache.commons.io.DirectoryWalker
- Throws:
IOException
- See Also:
DirectoryWalker.handleDirectoryStart(java.io.File, int, java.util.Collection)
handleEnd
protected void handleEnd(Collection results)
throws IOException
- Overrides:
handleEnd
in class org.apache.commons.io.DirectoryWalker
- Throws:
IOException
- See Also:
DirectoryWalker.handleEnd(java.util.Collection)
handleFile
protected void handleFile(File file,
int depth,
Collection results)
throws IOException
- Overrides:
handleFile
in class org.apache.commons.io.DirectoryWalker
- Throws:
IOException
- See Also:
DirectoryWalker.handleFile(java.io.File, int, java.util.Collection)
handleStart
protected void handleStart(File startDirectory,
Collection results)
throws IOException
- Overrides:
handleStart
in class org.apache.commons.io.DirectoryWalker
- Throws:
IOException
- See Also:
DirectoryWalker.handleStart(java.io.File, java.util.Collection)
Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.