Interface PathDetails

  • All Known Implementing Classes:
    BasicPathDetails

    public interface PathDetails
    Describes a Path along with its metadata. The information is accurate as of the time of the entry is created; the same calls at a future point in time on the associated path using the same FileClient may return a different value.

    Because details can only be reported on existing file system objects, it is safe to assume the associated path existed at the time of the call.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long getLength()
      Returns the length of the file represented by the associated path.
      Path getPath()
      Gets the path associated with the metadata.
      boolean isDirectory()
      Indicates whether the associated path represents a directory.
      boolean isFile()
      Indicates whether the associated path represents a file.
      boolean isHidden()
      Indicates whether the associated path is hidden by the file system.
      boolean isReadable()
      Indicates whether the associated path can be read.
      boolean isWritable()
      Indicates whether the associated path can be written.
    • Method Detail

      • getPath

        Path getPath()
        Gets the path associated with the metadata.
        Returns:
        the associated file system object's path
      • isReadable

        boolean isReadable()
        Indicates whether the associated path can be read.
        Returns:
        true the path represents a readable file or directory, false otherwise.
        See Also:
        FileClient.isReadable(Path)
      • isWritable

        boolean isWritable()
        Indicates whether the associated path can be written.
        Returns:
        true the path represents a writable file or directory, false otherwise.
        See Also:
        FileClient.isWritable(Path)
      • isFile

        boolean isFile()
        Indicates whether the associated path represents a file.
        Returns:
        true the path represents a file, false otherwise.
        See Also:
        FileClient.isFile(Path)
      • isDirectory

        boolean isDirectory()
        Indicates whether the associated path represents a directory.
        Returns:
        true the path represents a directory, false otherwise.
        See Also:
        FileClient.isDirectory(Path)
      • getLength

        long getLength()
        Returns the length of the file represented by the associated path.
        Returns:
        the length of the file
        See Also:
        FileClient.getLength(Path)
      • isHidden

        boolean isHidden()
        Indicates whether the associated path is hidden by the file system.
        Returns:
        true if the path is hidden, false otherwise.
        See Also:
        FileClient.isHidden(Path)