com.sshtools.j2ssh.sftp
Class SftpFile

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

public class SftpFile
extends java.lang.Object
implements java.lang.Comparable

Version:
$Revision: 1.23 $
Author:
$author$

Constructor Summary
SftpFile(java.lang.String absolutePath)
          Creates a new SftpFile object.
SftpFile(java.lang.String absolutePath, FileAttributes attrs)
          Creates a new SftpFile object.
 
Method Summary
 boolean canRead()
           
 boolean canWrite()
           
 void close()
           
 int compareTo(java.lang.Object o)
           
 void delete()
           
 java.lang.String getAbsolutePath()
           
 FileAttributes getAttributes()
           
 java.lang.String getFilename()
           
protected  byte[] getHandle()
           
 java.lang.String getLongname()
           
protected  SftpSubsystemClient getSFTPSubsystem()
           
 boolean isBlock()
           
 boolean isCharacter()
           
 boolean isDirectory()
           
 boolean isFifo()
           
 boolean isFile()
           
 boolean isLink()
           
 boolean isOpen()
           
 boolean isSocket()
           
 void rename(java.lang.String newFilename)
           
protected  void setHandle(byte[] handle)
           
protected  void setSFTPSubsystem(SftpSubsystemClient sftp)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SftpFile

public SftpFile(java.lang.String absolutePath,
                FileAttributes attrs)
Creates a new SftpFile object.

Parameters:
absolutePath -
attrs -

SftpFile

public SftpFile(java.lang.String absolutePath)
Creates a new SftpFile object.

Parameters:
absolutePath -
Method Detail

delete

public void delete()
            throws java.io.IOException
Throws:
java.io.IOException

rename

public void rename(java.lang.String newFilename)
            throws java.io.IOException
Parameters:
newFilename -
Throws:
java.io.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 java.lang.String getFilename()
Returns:

getLongname

public java.lang.String getLongname()
Returns:

getAttributes

public FileAttributes getAttributes()
Returns:

getAbsolutePath

public java.lang.String getAbsolutePath()
Returns:

close

public void close()
           throws java.io.IOException
Throws:
java.io.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(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable


Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.