|
||||||||||
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. |
void |
rename(java.lang.String newFilename)
Rename a file on the remote server. |
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)
attrs
- Method Detail |
public SftpFile getParent() throws SshException, SftpStatusException
SshException
SftpStatusException
public java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object obj)
obj
-
public void delete() throws SftpStatusException, SshException
SshException
SftpStatusException
public void rename(java.lang.String newFilename) throws SftpStatusException, SshException
newFilename
-
SshException
SftpStatusException
public boolean canWrite() throws SftpStatusException, SshException
SftpStatusException
SshException
public boolean canRead() throws SftpStatusException, SshException
SftpStatusException
SshException
public boolean isOpen()
public byte[] getHandle()
public SftpSubsystemChannel getSFTPChannel()
public java.lang.String getFilename()
public SftpFileAttributes getAttributes() throws SftpStatusException, SshException
SftpStatusException
SshException
public 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.
SftpStatusException
SshException
public boolean isFile() throws SftpStatusException, SshException
SftpStatusException
SshException
public boolean isLink() throws SftpStatusException, SshException
SftpStatusException
SshException
public boolean isFifo() throws SftpStatusException, SshException
SftpStatusException
SshException
public boolean isBlock() throws SftpStatusException, SshException
SftpStatusException
SshException
public boolean isCharacter() throws SftpStatusException, SshException
SftpStatusException
SshException
public boolean isSocket() throws SftpStatusException, SshException
SftpStatusException
SshException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |