public class FileCrawler extends Crawler
directoryFilter, fileFilter, ignoreList
Constructor and Description |
---|
FileCrawler() |
Modifier and Type | Method and Description |
---|---|
List<Target> |
crawl(URL fileUrl,
boolean getDirectories,
org.apache.commons.io.filefilter.IOFileFilter fileFilter)
Crawl a given directory url.
|
List<Target> |
crawl(URL fileUrl,
String[] extensions,
boolean getDirectories,
String nameToken)
Crawl a given directory url.
|
List<Target> |
crawl(URL fileUrl,
String[] extensions,
boolean getDirectories,
String nameToken,
boolean ignoreCaseFlag)
Crawl a given directory url.
|
addAllIgnoreItems, crawl, crawl, crawl, setFileFilter, setFileFilter
public List<Target> crawl(URL fileUrl, boolean getDirectories, org.apache.commons.io.filefilter.IOFileFilter fileFilter) throws IOException
crawl
in class Crawler
fileUrl
- File url.IOException
public List<Target> crawl(URL fileUrl, String[] extensions, boolean getDirectories, String nameToken, boolean ignoreCaseFlag) throws IOException
fileUrl
- File url.extensions
- The file matching file a list of file extensions.getDirectories
- Flag if True will crawl next sub directory.nameToken
- The substring will be searched for in the file names. Note that the search
will be done in all lower cased if ignoreCaseFlag is true.ignoreCaseFlag
- Flag to ignore case when comparing the file name found with the
nameToken.IOException
public List<Target> crawl(URL fileUrl, String[] extensions, boolean getDirectories, String nameToken) throws IOException
crawl
in class Crawler
fileUrl
- File url.extensions
- The file matching file a list of file extensions.getDirectories
- Flag if True will crawl next sub directory.nameToken
- The substring will be searched for in the file names. Note that the search
will be done in all lower cased.IOException
Copyright © 2023 Jet Propulsion Laboratory, California Institute of Technology. All rights reserved.