commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Cohen <sco...@javactivity.org>
Subject [net] I would like to deprecate a FTPClient.listFiles() method
Date Sun, 13 Feb 2005 17:49:19 GMT
The introduction of FTPClientConfig a month ago has wrought a certain 
amount of confusion.  There are five FTPClient.listFiles() methods.  Two 
have already been deprecated.  The other two are convenience methods and 
their existence causes confusion.

This method is:
     public FTPFile[] listFiles(String parserKey, String pathname)

This method calls initiateListParsing().  If parserKey is null, then the 
code will look for the __configuration member.  The problem arises when 
the user sets the __configuration member AND calls listFiles with a 
parserKey.  This non-intuively causes the __configuration to be ignored. 
  Since it is possible to set the parserKey through the __configuration, 
I would like this method to be the preferred way to specify a parser key 
and the convenience method deprcated.  Keep in mind that the no-param 
listFiles() is the most commonly used and defaults to auto-detection of 
system type if no configuration has been specified.

I also question the utility of
     public FTPFile[] listFiles(String pathname)
but not as strongly.

This method is not necessary as it is always possible to call
changeWorkingDirectory() before calling listFiles().

What does the team think of these changes?




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message