commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1094545 - /commons/proper/net/trunk/src/main/java/examples/ftp/FTPClientExample.java
Date Mon, 18 Apr 2011 12:50:33 GMT
Author: sebb
Date: Mon Apr 18 12:50:32 2011
New Revision: 1094545

URL: http://svn.apache.org/viewvc?rev=1094545&view=rev
Log:
toString() is same as raw; so show formatted output instead

Modified:
    commons/proper/net/trunk/src/main/java/examples/ftp/FTPClientExample.java

Modified: commons/proper/net/trunk/src/main/java/examples/ftp/FTPClientExample.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/examples/ftp/FTPClientExample.java?rev=1094545&r1=1094544&r2=1094545&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/examples/ftp/FTPClientExample.java (original)
+++ commons/proper/net/trunk/src/main/java/examples/ftp/FTPClientExample.java Mon Apr 18 12:50:32
2011
@@ -27,6 +27,7 @@ import java.io.PrintWriter;
 import org.apache.commons.net.PrintCommandListener;
 import org.apache.commons.net.ftp.FTP;
 import org.apache.commons.net.ftp.FTPClient;
+import org.apache.commons.net.ftp.FTPClientConfig;
 import org.apache.commons.net.ftp.FTPConnectionClosedException;
 import org.apache.commons.net.ftp.FTPFile;
 import org.apache.commons.net.ftp.FTPReply;
@@ -285,7 +286,8 @@ __main:
             else if (listFiles)
             {
                 for (FTPFile f : ftp.listFiles(remote)) {
-                    System.out.println(f);
+                    System.out.println(f.getRawListing());
+                    System.out.println(f.toFormattedString());
                 }
             }
             else if (mlsd)



Mime
View raw message