Class SftpFile

java.lang.Object
com.sshtools.client.sftp.SftpFile

public final class SftpFile extends Object
Represents an SFTP file object.
  • Method Details

    • attributes

      public SftpFileAttributes attributes()
      Get the attributes for this file as they were when this file object was obtained. To get the latest attributes, call #refresh() to obtain a new SftpFile instance.
      Returns:
      attributes
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getLongname

      public String getLongname()
      The longname supplied by the server. Note this will not be present if SFTP version is > 3.
      Returns:
    • getFilename

      public String getFilename()
      Get the filename.
      Returns:
      String
    • getAbsolutePath

      public String getAbsolutePath()
      Get the absolute path
      Returns:
      String