|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.maverick.sftp.SftpFile
Represents an SFTP file object.
| Constructor Summary | |
SftpFile(java.lang.String path,
SftpFileAttributes attrs)
Creates a new SftpFile object. |
|
| Method Summary | |
boolean |
canRead()
Determine whether the user has read access to the file. |
boolean |
canWrite()
Determine whether the user has write access to the file. |
void |
close()
Close the file. |
void |
delete()
Delete this file/directory from the remote server. |
boolean |
equals(java.lang.Object obj)
Compares the Object to this instance and returns true if they point to the same file. |
java.lang.String |
getAbsolutePath()
Get the absolute path |
SftpFileAttributes |
getAttributes()
Get the files attributes. |
java.lang.String |
getFilename()
Get the filename. |
byte[] |
getHandle()
Get the open file handle |
SftpFile |
getParent()
Get the parent of the current file. |
SftpSubsystemChannel |
getSFTPChannel()
Get the SFTP subsystem channel that created this file object. |
int |
hashCode()
|
boolean |
isBlock()
Determine whether the file is pointing to a block special file. |
boolean |
isCharacter()
Determine whether the file is pointing to a character mode device. |
boolean |
isDirectory()
Determine whether the file object is pointing to a directory. |
boolean |
isFifo()
Determine whether the file is pointing to a pipe. |
boolean |
isFile()
Determine whether the file object is pointing to a file. |
boolean |
isLink()
Determine whether the file object is a symbolic link. |
boolean |
isOpen()
Determine whether the file is open. |
boolean |
isSocket()
Determine whether the file is pointing to a socket. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SftpFile(java.lang.String path,
SftpFileAttributes attrs)
path - attrs - | Method Detail |
public SftpFile getParent()
throws SshException,
SftpStatusException
SshException
SftpStatusExceptionpublic java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object obj)
obj -
public void delete()
throws SftpStatusException,
SshException
SshException
SftpStatusException
public boolean canWrite()
throws SftpStatusException,
SshException
SftpStatusException
SshException
public boolean canRead()
throws SftpStatusException,
SshException
SftpStatusException
SshExceptionpublic boolean isOpen()
public byte[] getHandle()
public SftpSubsystemChannel getSFTPChannel()
public java.lang.String getFilename()
public SftpFileAttributes getAttributes()
throws SftpStatusException,
SshException
SshException
SftpStatusExceptionpublic java.lang.String getAbsolutePath()
public void close()
throws SftpStatusException,
SshException
SshException
SftpStatusException
public boolean isDirectory()
throws SftpStatusException,
SshException
false
will be returned. Use SftpClient.isDirectoryOrLinkedDirectory(SftpFile) instead if you
wish to follow links.
SshException
SftpStatusException
public boolean isFile()
throws SftpStatusException,
SshException
SshException
SftpStatusException
public boolean isLink()
throws SftpStatusException,
SshException
SshException
SftpStatusException
public boolean isFifo()
throws SftpStatusException,
SshException
SshException
SftpStatusException
public boolean isBlock()
throws SftpStatusException,
SshException
SshException
SftpStatusException
public boolean isCharacter()
throws SftpStatusException,
SshException
SshException
SftpStatusException
public boolean isSocket()
throws SftpStatusException,
SshException
SshException
SftpStatusException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||