Class RecursiveDirectoryScanner
java.lang.Object
org.springframework.integration.file.DefaultDirectoryScanner
org.springframework.integration.file.RecursiveDirectoryScanner
- All Implemented Interfaces:
- DirectoryScanner
The 
DefaultDirectoryScanner extension which walks through the directory tree
 using Files.walk(Path, int, FileVisitOption...).
 
 By default, this class visits all levels of the file tree without any FileVisitOptions.
- Since:
- 5.0
- Author:
- Artem Bilan, Gary Russell
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionScans the directory according to the strategy particular to this implementation and returns the selected files as a File array.voidsetFileVisitOptions(FileVisitOption... fileVisitOptions) The options to configure the traversal.voidsetMaxDepth(int maxDepth) The maximum number of directory levels to visit.Methods inherited from class org.springframework.integration.file.DefaultDirectoryScannergetFilter, getLocker, listEligibleFiles, setFilter, setLocker, tryClaim
- 
Constructor Details- 
RecursiveDirectoryScannerpublic RecursiveDirectoryScanner()
 
- 
- 
Method Details- 
setMaxDepthpublic void setMaxDepth(int maxDepth) The maximum number of directory levels to visit.- Parameters:
- maxDepth- the maximum number of directory levels to visit
 
- 
setFileVisitOptionsThe options to configure the traversal.- Parameters:
- fileVisitOptions- options to configure the traversal
 
- 
listFilesDescription copied from interface:DirectoryScannerScans the directory according to the strategy particular to this implementation and returns the selected files as a File array. This method may never return files that are rejected by the filter.- Specified by:
- listFilesin interface- DirectoryScanner
- Overrides:
- listFilesin class- DefaultDirectoryScanner
- Parameters:
- directory- the directory to scan for files
- Returns:
- a list of files representing the content of the directory
- Throws:
- IllegalArgumentException- if the input is incorrect
 
 
-