Package edu.isi.pegasus.gridftp
Class FileInfo
- java.lang.Object
-
- edu.isi.pegasus.gridftp.FileInfo
-
- All Implemented Interfaces:
java.lang.Comparable<FileInfo>
public class FileInfo extends java.lang.Object implements java.lang.Comparable<FileInfo>
Stores information about a file or directory, such as its name, size, type, etc. TODO This class should be refactored to store the actual info, instead of just storing the long format.- Author:
- Gideon Juve
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringlongFormatprivate java.lang.Stringname
-
Constructor Summary
Constructors Modifier Constructor Description privateFileInfo(java.lang.String name, java.lang.String longFormat)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(FileInfo other)static FileInfofromLongFormat(java.lang.String longFormat)static FileInfofromMlsxEntry(org.globus.ftp.MlsxEntry entry)static FileInfofromShortFormat(java.lang.String shortFormat)java.lang.StringgetName()booleanisDirectory()java.lang.StringtoString()
-
-
-
Method Detail
-
compareTo
public int compareTo(FileInfo other)
- Specified by:
compareToin interfacejava.lang.Comparable<FileInfo>
-
getName
public java.lang.String getName()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
isDirectory
public boolean isDirectory()
-
fromLongFormat
public static FileInfo fromLongFormat(java.lang.String longFormat)
-
fromShortFormat
public static FileInfo fromShortFormat(java.lang.String shortFormat)
-
fromMlsxEntry
public static FileInfo fromMlsxEntry(org.globus.ftp.MlsxEntry entry)
-
-