Class DirectoryEntry

java.lang.Object
software.amazon.awssdk.crt.io.DirectoryEntry

public class DirectoryEntry extends Object
Supplied during calls to DirectoryTraversal.traverse() as each entry is encountered.
  • Constructor Details

    • DirectoryEntry

      public DirectoryEntry()
  • Method Details

    • withPath

      public DirectoryEntry withPath(String path)
      Sets the absolute path of this entry
      Parameters:
      path - path
      Returns:
      this entry object
    • getPath

      public String getPath()
      Returns:
      the absolute path of this entry
    • withRelativePath

      public DirectoryEntry withRelativePath(String relativePath)
      Sets the path relative to the current working directory
      Parameters:
      relativePath - relative path
      Returns:
      this entry object
    • getRelativePath

      public String getRelativePath()
      Returns:
      the path relative to the current working directory
    • withIsDirectory

      public DirectoryEntry withIsDirectory(boolean isDirectory)
      Sets the isDirectory flag, meaning this entry corresponds to a directory
      Parameters:
      isDirectory - isDirectory
      Returns:
      this entry object
    • isDirectory

      public boolean isDirectory()
      Returns:
      true if this entry corresponds to a directory
    • withIsSymLink

      public DirectoryEntry withIsSymLink(boolean isSymLink)
      Sets the isSymLink flag, meaning this entry corresponds to a symbolic link
      Parameters:
      isSymLink - isSymLink
      Returns:
      this entry object
    • isSymLink

      public boolean isSymLink()
      Returns:
      true if this entry corresponds to a symbolic link.
    • withIsFile

      public DirectoryEntry withIsFile(boolean isFile)
      Sets the isFile flag, meaning this entry corresponds to a file
      Parameters:
      isFile - isFile
      Returns:
      this entry object
    • isFile

      public boolean isFile()
      Returns:
      true if this entry corresponds to a file
    • withFileSize

      public DirectoryEntry withFileSize(long fileSize)
      Sets the file size corresponding to this entry
      Parameters:
      fileSize - file size in bytes
      Returns:
      this entry object
    • getFileSize

      public long getFileSize()
      Returns:
      the size of the file