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: File Component: how to sort files as WindowsExplorer?
Date Tue, 15 Nov 2011 15:51:28 GMT
Hi

You can use a custom sorter with the Camel file component
http://camel.apache.org/file2

See this unit test for an example
https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileSorterRefTest.java


On Tue, Nov 15, 2011 at 4:42 PM, H Paul <passmeapie@gmail.com> wrote:
> File Component: how to sort files as WindowsExplorer? 1M Thanks.
>
>
> Using java, I do:
>
> To get a list of file sorted/ordered as Window Explorer:
>
> 1. Use listFiles() and store list of files in a listOfFileName
> 2. Collections.sort(listOfFileName, new WindowsExplorerStringComparator());
> 3. listOfFileName is sorted/ordered as Window Explorer.
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/File-Component-how-to-sort-files-as-WindowsExplorer-tp4994675p4994675.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message