edu.northwestern.at.utils

## Class FileInfo

- java.lang.Object
- - edu.northwestern.at.utils.FileInfo

-     public class FileInfo
      extends java.lang.Object

  Holds information about a single file.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) java.lang.String` | `baseDirectory` The base directory.
    `(package private) java.io.File` | `file` The wrapped file.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileInfo(java.io.File file)` Create a wrapped file.
    `FileInfo(java.io.File file, java.io.File baseDirectory)` Create a wrapped file.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getFileName()` Get file name.
    `java.lang.String` | `getFullFileName()` Get full file name.
    `boolean` | `getIsDirectory()` True if file is a directory.
    `boolean` | `getIsFile()` True if file is a normal file.
    `long` | `getLastModified()` Get last modified time.
    `java.util.Date` | `getLastModifiedDateTime()` Get last modified date/time.
    `long` | `getLength()` Get file length.
    `java.io.File` | `getParentFile()` Get parent file.
    `java.lang.String` | `getParentPath()` Get parent file path.
    `java.lang.String` | `getRelativeFileName()` Get full file name relative to base directory.
    `java.lang.String` | `getRelativeParentPath()` Get parent directory path relative to base directory.
    `java.lang.String` | `toString()` Return full file name as default string value.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### file

          java.io.File file

      The wrapped file.

    - #### baseDirectory

          java.lang.String baseDirectory

      The base directory.

  - ### Constructor Detail

    - #### FileInfo

          public FileInfo(java.io.File file)

      Create a wrapped file.
      Parameters:
        `file` - The file to wrap.

    - #### FileInfo

          public FileInfo(java.io.File file,
                  java.io.File baseDirectory)

      Create a wrapped file.
      Parameters:
        `file` - The file to wrap.
        `baseDirectory` - The base directory.

  - ### Method Detail

    - #### getFileName

          public java.lang.String getFileName()

      Get file name.
      Returns:
        Short file name without leading path.

    - #### getFullFileName

          public java.lang.String getFullFileName()

      Get full file name.
      Returns:
        Full file name with leading path.

    - #### getRelativeFileName

          public java.lang.String getRelativeFileName()

      Get full file name relative to base directory.
      Returns:
        Full file name with leading path relative to base directory.

    - #### getLength

          public long getLength()

      Get file length.
      Returns:
        File length.

    - #### getLastModified

          public long getLastModified()

      Get last modified time.
      Returns:
        Last modified time.

    - #### getLastModifiedDateTime

          public java.util.Date getLastModifiedDateTime()

      Get last modified date/time.
      Returns:
        Last modified date/time.

    - #### getIsFile

          public boolean getIsFile()

      True if file is a normal file.
      Returns:
        true if file is a normal file.

    - #### getIsDirectory

          public boolean getIsDirectory()

      True if file is a directory.
      Returns:
        true if file is a directory.

    - #### getParentFile

          public java.io.File getParentFile()

      Get parent file.
      Returns:
        Parent file.

    - #### getParentPath

          public java.lang.String getParentPath()

      Get parent file path.
      Returns:
        Parent file path.

    - #### getRelativeParentPath

          public java.lang.String getRelativeParentPath()

      Get parent directory path relative to base directory.
      Returns:
        Parent directory path relative to base directory.

    - #### toString

          public java.lang.String toString()

      Return full file name as default string value.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        full file name.