Class SftpFile

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

public class SftpFile extends Object
Represents an SFTP file object.
Author:
Lee David Painter
  • Constructor Details

    • SftpFile

      public SftpFile(String path, SftpFileAttributes attrs)
      Creates a new SftpFile object.

      IMPORTANT: Each SftpFile object should be initialized with the relative path of the file when used in com.sshtools.common.sftp.FileSystem#readDirectory. For all other uses an absolute path is required.

      Parameters:
      path -
      attrs -
  • Method Details

    • hashCode

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

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

      public SftpFileAttributes getAttributes()
      Get the files attributes.
      Returns:
      SftpFileAttributes
    • getAbsolutePath

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