|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SshFile
This is the file abstraction used by the server.
| Method Summary | |
|---|---|
boolean |
create()
Create the file. |
java.io.InputStream |
createInputStream(long offset)
Create input stream for reading. |
java.io.OutputStream |
createOutputStream(long offset)
Create output stream for writing. |
boolean |
delete()
Delete file. |
boolean |
doesExist()
Does this file exists? |
java.lang.String |
getAbsolutePath()
Get the full path from the base directory of the FileSystemView. |
long |
getLastModified()
Get last modified time in UTC. |
java.lang.String |
getName()
Get the file name of the file |
java.lang.String |
getOwner()
Get the owner name of the file |
SshFile |
getParentFile()
Get the immediate parent. |
long |
getSize()
Get file size. |
void |
handleClose()
Handle post-handle-close functionality. |
boolean |
isDirectory()
Is it a directory? |
boolean |
isExecutable()
Has exec permission? |
boolean |
isFile()
Is it a file? |
boolean |
isReadable()
Has read permission? |
boolean |
isRemovable()
Has delete permission? |
boolean |
isWritable()
Has write permission? |
java.util.List<SshFile> |
listSshFiles()
List file objects. |
boolean |
mkdir()
Create directory. |
boolean |
move(SshFile destination)
Move file. |
boolean |
setLastModified(long time)
Set the last modified time stamp of a file |
void |
truncate()
Truncate the file to length 0. |
| Method Detail |
|---|
java.lang.String getAbsolutePath()
java.lang.String getName()
java.lang.String getOwner()
boolean isDirectory()
SshFile is a directoryboolean isFile()
SshFile is a file, false if it is a directoryboolean doesExist()
SshFile existsboolean isReadable()
SshFile is readable by the userboolean isWritable()
SshFile is writable by the userboolean isExecutable()
SshFile is executable by the userboolean isRemovable()
SshFile is removable by the userSshFile getParentFile()
long getLastModified()
SshFileboolean setLastModified(long time)
time - The last modified time, in milliseconds since the epoch. See File.setLastModified(long).long getSize()
SshFile in bytesboolean mkdir()
boolean delete()
boolean create()
throws java.io.IOException
java.io.IOException - if something wrong happen
void truncate()
throws java.io.IOException
java.io.IOException - if something wrong happenboolean move(SshFile destination)
destination - The target SshFile to move the current SshFile to
java.util.List<SshFile> listSshFiles()
List of SshFiles
java.io.OutputStream createOutputStream(long offset)
throws java.io.IOException
offset - The number of bytes at where to start writing.
If the file is not random accessible,
any offset other than zero will throw an exception.
OutputStream used to write to the SshFile
java.io.IOException
java.io.InputStream createInputStream(long offset)
throws java.io.IOException
offset - The number of bytes of where to start reading.
If the file is not random accessible,
any offset other than zero will throw an exception.
InputStream used to read the SshFile
java.io.IOException
void handleClose()
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||