Class SftpFile

java.lang.Object
com.sshtools.j2ssh.sftp.SftpFile
All Implemented Interfaces:
Comparable

public class SftpFile extends Object implements Comparable
Version:
$Revision: 1.23 $
Author:
$author$
  • Constructor Details

    • SftpFile

      public SftpFile(String absolutePath, FileAttributes attrs)
      Creates a new SftpFile object.
      Parameters:
      absolutePath -
      attrs -
    • SftpFile

      public SftpFile(String absolutePath)
      Creates a new SftpFile object.
      Parameters:
      absolutePath -
  • Method Details

    • delete

      public void delete() throws IOException
      Throws:
      IOException
    • rename

      public void rename(String newFilename) throws IOException
      Parameters:
      newFilename -
      Throws:
      IOException
    • canWrite

      public boolean canWrite()
      Returns:
    • canRead

      public boolean canRead()
      Returns:
    • isOpen

      public boolean isOpen()
      Returns:
    • setHandle

      protected void setHandle(byte[] handle)
      Parameters:
      handle -
    • getHandle

      protected byte[] getHandle()
      Returns:
    • setSFTPSubsystem

      protected void setSFTPSubsystem(SftpSubsystemClient sftp)
      Parameters:
      sftp -
    • getSFTPSubsystem

      protected SftpSubsystemClient getSFTPSubsystem()
      Returns:
    • getFilename

      public String getFilename()
      Returns:
    • getLongname

      public String getLongname()
      Returns:
    • getAttributes

      public FileAttributes getAttributes()
      Returns:
    • getAbsolutePath

      public String getAbsolutePath()
      Returns:
    • close

      public void close() throws IOException
      Throws:
      IOException
    • isDirectory

      public boolean isDirectory()
      Returns:
    • isFile

      public boolean isFile()
      Returns:
    • isLink

      public boolean isLink()
      Returns:
    • isFifo

      public boolean isFifo()
      Returns:
    • isBlock

      public boolean isBlock()
      Returns:
    • isCharacter

      public boolean isCharacter()
      Returns:
    • isSocket

      public boolean isSocket()
      Returns:
    • compareTo

      public int compareTo(Object o)
      Specified by:
      compareTo in interface Comparable