Steve Cohen wrote:
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'm OK with this one, make sense to me.
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().
Unless I'm mistaken, the above doesn't change directories then call
listfiles() though. So I'd need to have:
changeWorkingDirectory(path);
listFiles();
changeWorkingDirectory(backToWhereWeWere);
Although I've had problems *without* doing the above (VMS), I'd like to
see the method left in there.
--
=
Jeffrey D. Brekke [EMAIL PROTECTED]
Wisconsin, USA [EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]