commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [NET]FTPSClient listFiles() throw SocketException when current directory's file is null.
Date Sun, 13 Mar 2011 02:03:53 GMT
On 12 March 2011 10:42, chenxuejie <chen_xuejie@nec.cn> wrote:
> Hi All.
>
>  I use FTPSClient to list FTP server's directory.
>  When FTP server's directory contains file, FTPSClient.listFiles() execute
> correctly.
>  But, when FTP server's directory  do not contains any file. it allways
> throw exception.

Which version of NET are you using?

What is the exact Exception thrown?

>  My example code as follows.
>  static void main(String[] args){
>
>  FTPSClient client = new FTPSClient();
>  //start to set KeyManager and TrustManager
>  .....
>  client .setKeyManager(kmf.getKeyManagers()[0]);
>  client .setTrustManager(tmf.getTrustManagers()[0]);
>  //end set KeyManager and TrustManager
>
>  client .connect(localhost, 21);
>  client .login(guest,guest);
>  client .execPROT("P");
>  client .execPBSZ(0);
>  client .pwd();
>  client .pasv();
>  client .listFiles();
>  }
>
>  Xuejie.Chen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

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


Mime
View raw message