Hi,
I need to use FTPClient.listFiles or something alike, that let's me choose the order of which files are iterated.
I've searched the web quite a bit and couldn't find anything regarding this subject.
Thanks in advance
regards
Printable View
Hi,
I need to use FTPClient.listFiles or something alike, that let's me choose the order of which files are iterated.
I've searched the web quite a bit and couldn't find anything regarding this subject.
Thanks in advance
regards
I don't think you can specify an order.
All the ftp 'ls' does is call the equivalent to 'ls' on the server, so you get it back in whatever order the server deems appropriate.
If you need to present the FTPFile objects in a particular order for later processing in the app then I would suggest using Arrays.sort and provide a suitable Comparator to sort your FTPFile[].