Camel Ftp2 filter over directories
I have these files (as a sample; I actually have much more): /files/dir1/dir_a/f.xml /files/dir1/dir_b/f.xml /files/dir2/dir_a/f.xml /files/dir2/dir_b/f.xml
and I need the following filter: /files/*/dir_a/f.xml
I use Camel Ftp2 and AntPathMatcher, and it works fine.
However, Ftp2 lists first all the files and then validates each one with AntPathMatcher. The problem is that I happen to have a lot of files in /files/*/dir_b/, and the ftp connection could be slow, so that it takes too long. It would be better if Ftp2 and AntPathMatcher work together (not one after the other), so that Ftp2 knows that it does not need to scan all files at /files/*/dir_b/
Is i开发者_C百科t possible to achieve that in some way?
The FTP Client API would then need support for listing directories using filters (eg * as wildcard etc.). However I have not seen this supported. I wonder if thats even support in the "FTP standard".
精彩评论