org.springframework.integration.file
Class RecursiveLeafOnlyDirectoryScanner

java.lang.Object
  extended by org.springframework.integration.file.RecursiveLeafOnlyDirectoryScanner
All Implemented Interfaces:
DirectoryScanner

public class RecursiveLeafOnlyDirectoryScanner
extends java.lang.Object
implements DirectoryScanner

DirectoryScanner that lists all files inside a directory and subdirectories, without limit. This scanner should not be used with directories that contain a vast number of files, as all the file names will be read into memory and the scanning will be done recursively.

Author:
Iwein Fuld

Constructor Summary
RecursiveLeafOnlyDirectoryScanner()
           
 
Method Summary
 java.io.File[] listFiles(java.io.File directory)
          Scans the directory according to the strategy particular to this implementation and returns the selected files as a File array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecursiveLeafOnlyDirectoryScanner

public RecursiveLeafOnlyDirectoryScanner()
Method Detail

listFiles

public java.io.File[] listFiles(java.io.File directory)
                         throws java.lang.IllegalArgumentException
Description copied from interface: DirectoryScanner
Scans the directory according to the strategy particular to this implementation and returns the selected files as a File array.

Specified by:
listFiles in interface DirectoryScanner
Parameters:
directory - the directory to scan for files
Returns:
a list of files representing the content of the directory
Throws:
java.lang.IllegalArgumentException