Class 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 Detail

      • name

        private java.lang.String name
      • longFormat

        private java.lang.String longFormat
    • Constructor Detail

      • FileInfo

        private FileInfo​(java.lang.String name,
                         java.lang.String longFormat)
    • Method Detail

      • compareTo

        public int compareTo​(FileInfo other)
        Specified by:
        compareTo in interface java.lang.Comparable<FileInfo>
      • getName

        public java.lang.String getName()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.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)