de.esprit.common.io

## Class PathInfo

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.common.util.TransferableObject
    - - de.esprit.common.io.PathInfo

- All Implemented Interfaces:
    Renderable, DeepCloneable, Dumpable, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<PathInfo>
  Direct Known Subclasses:
    RemotePathInfo

      public class PathInfo
      extends TransferableObject
      implements java.lang.Comparable<PathInfo>, Renderable

  This class stores a snapshot information of a `Path`.
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PathInfo(java.nio.file.Path path)`
    `PathInfo(java.nio.file.Path path, boolean isReadAttributes)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(PathInfo o)`
    `boolean` | `equals(java.lang.Object obj)`
    `FileDataType` | `getDataType()`
    `java.lang.String` | `getElement(int index)`
    `int` | `getElementCount()`
    `java.lang.String` | `getFileName()`
    `java.lang.String` | `getFullPathName()`
    `long` | `getLastModified()`
    `PathInfo` | `getParent()`
    `java.lang.String` | `getParentPathName()`
    `java.awt.Color` | `getRenderColor()`
    `javax.swing.Icon` | `getRenderIcon()`
    `java.lang.String` | `getRenderText()`
    `java.lang.String` | `getRoot()`
    `long` | `getSize()`
    `int` | `hashCode()`
    `boolean` | `isDirectory()`
    `boolean` | `isExisting()`
    `boolean` | `isFile()`
    `boolean` | `startsWith(PathInfo path)`
    `DumpString` | `toDumpString(DumpString s)` This method allows subclasses to add values to the existing DumpString of the superclass.
    `java.io.File` | `toFile()`
    `java.nio.file.Path` | `toPath()`
    `ToString` | `toString(ToString s)` This method allows subclasses to add values to the existing ToString of the superclass.

    - ### Methods inherited from class de.esprit.common.util.TransferableObject

      `clone, deepClone`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString`

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

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PathInfo

          public PathInfo(java.nio.file.Path path)

    - #### PathInfo

          public PathInfo(java.nio.file.Path path,
                  boolean isReadAttributes)

  - ### Method Detail

    - #### getFileName

          public final java.lang.String getFileName()

    - #### getFullPathName

          public final java.lang.String getFullPathName()

    - #### getParentPathName

          public final java.lang.String getParentPathName()

    - #### getParent

          public final PathInfo getParent()

    - #### getRoot

          public final java.lang.String getRoot()

    - #### getElementCount

          public final int getElementCount()

    - #### getElement

          public final java.lang.String getElement(int index)

    - #### getDataType

          public final FileDataType getDataType()

    - #### isExisting

          public final boolean isExisting()

    - #### getSize

          public final long getSize()

    - #### getLastModified

          public final long getLastModified()

    - #### isDirectory

          public final boolean isDirectory()

    - #### isFile

          public final boolean isFile()

    - #### hashCode

          public final int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### startsWith

          public final boolean startsWith(PathInfo path)

    - #### compareTo

          public int compareTo(PathInfo o)

      Specified by:
        `compareTo` in interface `java.lang.Comparable<PathInfo>`

    - #### toPath

          public final java.nio.file.Path toPath()

    - #### toFile

          public final java.io.File toFile()

    - #### getRenderColor

          public java.awt.Color getRenderColor()

      Specified by:
        `getRenderColor` in interface `Renderable`

    - #### getRenderIcon

          public javax.swing.Icon getRenderIcon()

      Specified by:
        `getRenderIcon` in interface `Renderable`

    - #### getRenderText

          public java.lang.String getRenderText()

      Specified by:
        `getRenderText` in interface `Renderable`

    - #### toString

          public ToString toString(ToString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing ToString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toString` in interface `Dumpable`
      Overrides:
        `toString` in class `DumpableObject`

    - #### toDumpString

          public DumpString toDumpString(DumpString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing DumpString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toDumpString` in interface `Dumpable`
      Overrides:
        `toDumpString` in class `DumpableObject`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.