com.sshtools.j2ssh.sftp

Class SftpFile

Implemented Interfaces:
Comparable

public class SftpFile
extends java.lang.Object
implements Comparable

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

Constructor Summary

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

Method Summary

boolean
canRead()
boolean
canWrite()
void
close()
int
compareTo(Object o)
void
delete()
String
getAbsolutePath()
FileAttributes
getAttributes()
String
getFilename()
protected byte[]
getHandle()
String
getLongname()
protected SftpSubsystemClient
getSFTPSubsystem()
boolean
isBlock()
boolean
isCharacter()
boolean
isDirectory()
boolean
isFifo()
boolean
isFile()
boolean
isLink()
boolean
isOpen()
boolean
isSocket()
void
rename(String newFilename)
protected void
setHandle(byte[] handle)
protected void
setSFTPSubsystem(SftpSubsystemClient sftp)

Constructor Details

SftpFile

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

SftpFile

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

Method Details

canRead

public boolean canRead()
Returns:

canWrite

public boolean canWrite()
Returns:

close

public void close()
            throws IOException

compareTo

public int compareTo(Object o)

delete

public void delete()
            throws IOException

getAbsolutePath

public String getAbsolutePath()
Returns:

getAttributes

public FileAttributes getAttributes()
Returns:

getFilename

public String getFilename()
Returns:

getHandle

protected byte[] getHandle()
Returns:

getLongname

public String getLongname()
Returns:

getSFTPSubsystem

protected SftpSubsystemClient getSFTPSubsystem()
Returns:

isBlock

public boolean isBlock()
Returns:

isCharacter

public boolean isCharacter()
Returns:

isDirectory

public boolean isDirectory()
Returns:

isFifo

public boolean isFifo()
Returns:

isFile

public boolean isFile()
Returns:

isLink

public boolean isLink()
Returns:

isOpen

public boolean isOpen()
Returns:

isSocket

public boolean isSocket()
Returns:

rename

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

setHandle

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

setSFTPSubsystem

protected void setSFTPSubsystem(SftpSubsystemClient sftp)
Parameters:
sftp -

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