mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Francia <and...@andreafrancia.it>
Subject Re: Why FtpFile#listFiles() require that the file list is ordered?
Date Thu, 09 Oct 2008 10:52:11 GMT
Dave Roberts wrote:
> Emmanuel Lecharny wrote:
>> Andrea Francia wrote:
>>> Emmanuel Lecharny wrote:
>>>> Does it sounds a good idea ?
>>> I think that before designing a new method we will ask ourself if 
>>> there is a Use Case where it is used.
>> Good point. So is it important that the files are sorted or not 
>> sorted ? Do we have some use cases  for it ?
>> IMHO, I would rather prefer dealing with files sorted in @ order when 
>> I ask for a file list : as a user, if this method returns a sorted 
>> list, this is less work I have to do on my side.
> A standard command line FTP Client doesn't do any ordering of the list 
> information.  So as a user, I want to see the files come back sorted 
> by name.  As I recall, every server I've connected to does this.
Then I think that this should be a suggestion for the ftpclient 
implementation not a MUST requirement.
I'm suggesting to change the Javadoc should say:

    * List file objects. If not a directory or does not exist, null will be
    * returned. There is not requirements about the ordering of the files
    * but it's suggested to returned them ordered in alphabetical order.
   FtpFile[] listFiles();

Andrea Francia

View raw message