I've these dirs
|- Dad Dir
|--- Son Dir 1
|---- file1.txt
|---- file2.txt
|--- Son Dir 2
|---- file3.txt
it is possibile with a single stream, using the File Source
, extrapolate the contents of file*.txt
for example, giving in the input Dad Dir
Not with the standard source, but you can customize the source to use a WatchServiceDirectoryScanner
(java 7 or later) or RecursiveLeafOnlyDirectoryScanner
which is not recommended for large directory trees.
See the Spring Integration Reference Manual for information about configuring the file inbound channel adapter. Use the scanner
attribute on the adapter.