commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1082782 - /commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPFile.java
Date Fri, 18 Mar 2011 01:39:18 GMT
Author: sebb
Date: Fri Mar 18 01:39:18 2011
New Revision: 1082782

URL: http://svn.apache.org/viewvc?rev=1082782&view=rev
Log:
Initial stab at formatted parsed contents

Modified:
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPFile.java

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPFile.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPFile.java?rev=1082782&r1=1082781&r2=1082782&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPFile.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPFile.java Fri Mar
18 01:39:18 2011
@@ -380,4 +380,14 @@ public class FTPFile implements Serializ
         return _rawListing;
     }
 
+    /** @since 3.0 */
+    public String toFormattedString(){
+        StringBuilder sb = new StringBuilder();
+        sb.append(getName());
+        sb.append(' ');
+        sb.append(getSize());
+        sb.append(' ');
+        sb.append(getTimestamp().getTime().toString());
+        return sb.toString();
+    }
 }



Mime
View raw message