public class CommonsDirectoryWalker extends DirectoryWalker<FileSource> implements DirectoryLoader
| Constructor and Description |
|---|
CommonsDirectoryWalker(DirectorySource source,
IOFileFilter dirFilter,
IOFileFilter fileFilter)
Returns a new loader that uses a directory walker with directory and file filters.
|
CommonsDirectoryWalker(String root,
IOFileFilter dirFilter,
IOFileFilter fileFilter)
Returns a new loader that uses a directory walker with directory and file filters.
|
| Modifier and Type | Method and Description |
|---|---|
IsErrorSetFT |
getLoadErrors()
Returns collected errors from the last invocation of load or other methods.
|
DirectorySource |
getSource()
Returns the source set for the loader, that is where the loader loads information from.
|
protected void |
handleFile(File file,
int depth,
Collection<FileSource> results) |
FileSourceList |
load()
Loads information from a source and returns a specific object.
|
checkIfCancelled, filterDirectoryContents, handleCancelled, handleDirectory, handleDirectoryEnd, handleDirectoryStart, handleEnd, handleIsCancelled, handleRestricted, handleStart, walkclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitvalidateSourcepublic CommonsDirectoryWalker(DirectorySource source, IOFileFilter dirFilter, IOFileFilter fileFilter)
source - the directory source to load fromdirFilter - directory filters the walker should usefileFilter - file filters the walker should usepublic CommonsDirectoryWalker(String root, IOFileFilter dirFilter, IOFileFilter fileFilter)
root - the directory source to load fromdirFilter - directory filters the walker should usefileFilter - file filters the walker should usepublic FileSourceList load()
InfoLoaderInfoLoader.getLoadErrors() to retrieve them.load in interface DirectoryLoaderload in interface InfoLoaderpublic DirectorySource getSource()
InfoLoadergetSource in interface DirectoryLoadergetSource in interface InfoLoaderpublic IsErrorSetFT getLoadErrors()
InfoLoadergetLoadErrors in interface InfoLoaderprotected void handleFile(File file, int depth, Collection<FileSource> results) throws IOException
handleFile in class DirectoryWalker<FileSource>IOExceptionCopyright © 2010–2017. All rights reserved.