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.String
longFormat
private java.lang.String
name
-
Constructor Summary
Constructors Modifier Constructor Description private
FileInfo(java.lang.String name, java.lang.String longFormat)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(FileInfo other)
static FileInfo
fromLongFormat(java.lang.String longFormat)
static FileInfo
fromMlsxEntry(org.globus.ftp.MlsxEntry entry)
static FileInfo
fromShortFormat(java.lang.String shortFormat)
java.lang.String
getName()
boolean
isDirectory()
java.lang.String
toString()
-
-
-
Method Detail
-
compareTo
public int compareTo(FileInfo other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<FileInfo>
-
getName
public java.lang.String getName()
-
toString
public java.lang.String toString()
- Overrides:
toString
in 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)
-
-