camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen" <claus.ib...@gmail.com>
Subject Re: Poll a collection of subfolders with a single endpoint
Date Fri, 19 Dec 2008 10:00:35 GMT
On Fri, Dec 19, 2008 at 10:50 AM, Ramon Buckland
<ramon.buckland@gmail.com> wrote:
>>
>> c)
>> I have been considering supporting the ant path style
>> (**/dropOffFolder), that you have in spring resource.
>> But I didn't want to write an ant path style parser and camel-core
>> should not require spring.
>> But that would be cool
>>
>>
> Depend on the ant jar :-)
> We use the DirScanner quite a lot in code, because it just works really
> well.
> The ability to have two "selectors" would be good.
>
>   **/somedir/**/fileprefix*.csv,**/someother/dir/filepre*.txt
>
> A snippet of ANT code doing this is simply...
>
> DirectoryScanner dirScanner = new DirectoryScanner();
> dirScanner.setBasedir(myBaseDir);
> dirScanner.setIncludes(includes);  // String[]
> dirScanner.setExcludes(excludes);
> ...
> dirScanner.scan();
> ..
> // work with files in dirScanner.getIncludedFiles()
>
> simple :-)
Pretty cool.

I guess we should support a pluggable strategy for scanning
files/dirs. Then we can have deps on ANT (in camel-???) or spring in
camel-spring.
Yeah that is cool.

Feel free to add a ticket for it.

>
> r.
>



-- 

/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/

Mime
View raw message