public interface SshFile
| Modifier and Type | Interface and Description |
|---|---|
static class |
SshFile.Attribute |
static class |
SshFile.Permission |
| Modifier and Type | Method and Description |
|---|---|
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.
|
void |
createSymbolicLink(SshFile destination) |
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.
|
java.lang.Object |
getAttribute(SshFile.Attribute attribute,
boolean followLinks) |
java.util.Map<SshFile.Attribute,java.lang.Object> |
getAttributes(boolean followLinks) |
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.
|
java.lang.String |
readSymbolicLink() |
void |
setAttribute(SshFile.Attribute attribute,
java.lang.Object value) |
void |
setAttributes(java.util.Map<SshFile.Attribute,java.lang.Object> attributes) |
boolean |
setLastModified(long time)
Set the last modified time stamp of a file
|
void |
truncate()
Truncate the file to length 0.
|
java.lang.String getAbsolutePath()
java.lang.String getName()
java.util.Map<SshFile.Attribute,java.lang.Object> getAttributes(boolean followLinks) throws java.io.IOException
java.io.IOExceptionvoid setAttributes(java.util.Map<SshFile.Attribute,java.lang.Object> attributes) throws java.io.IOException
java.io.IOExceptionjava.lang.Object getAttribute(SshFile.Attribute attribute, boolean followLinks) throws java.io.IOException
java.io.IOExceptionvoid setAttribute(SshFile.Attribute attribute, java.lang.Object value) throws java.io.IOException
java.io.IOExceptionjava.lang.String readSymbolicLink()
throws java.io.IOException
java.io.IOExceptionvoid createSymbolicLink(SshFile destination) throws java.io.IOException
java.io.IOExceptionjava.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 happenvoid truncate()
throws java.io.IOException
java.io.IOException - if something wrong happenboolean move(SshFile destination)
java.util.List<SshFile> listSshFiles()
List of SshFilesjava.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 SshFilejava.io.IOExceptionjava.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 SshFilejava.io.IOExceptionvoid handleClose()
throws java.io.IOException
java.io.IOExceptionCopyright © 2008-2014 The Apache Software Foundation. All Rights Reserved.