Package com.sshtools.j2ssh.sftp
Class SftpFile
java.lang.Object
com.sshtools.j2ssh.sftp.SftpFile
- All Implemented Interfaces:
Comparable
- Version:
- $Revision: 1.23 $
- Author:
- $author$
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new SftpFile object.SftpFile
(String absolutePath, FileAttributes attrs) Creates a new SftpFile object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canRead()
boolean
canWrite()
void
close()
int
void
delete()
protected byte[]
protected SftpSubsystemClient
boolean
isBlock()
boolean
boolean
boolean
isFifo()
boolean
isFile()
boolean
isLink()
boolean
isOpen()
boolean
isSocket()
void
protected void
setHandle
(byte[] handle) protected void
-
Constructor Details
-
SftpFile
Creates a new SftpFile object.- Parameters:
absolutePath
-attrs
-
-
SftpFile
Creates a new SftpFile object.- Parameters:
absolutePath
-
-
-
Method Details
-
delete
- Throws:
IOException
-
rename
- 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
- Parameters:
sftp
-
-
getSFTPSubsystem
- Returns:
-
getFilename
- Returns:
-
getLongname
- Returns:
-
getAttributes
- Returns:
-
getAbsolutePath
- Returns:
-
close
- 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
- Specified by:
compareTo
in interfaceComparable
-