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.
|
InputStream |
createInputStream(long offset)
Create input stream for reading.
|
OutputStream |
createOutputStream(long offset)
Create output stream for writing.
|
boolean |
delete()
Delete file.
|
boolean |
doesExist()
Does this file exists?
|
String |
getAbsolutePath()
Get the full path from the base directory of the FileSystemView.
|
Object |
getAttribute(SshFile.Attribute attribute,
boolean followLinks) |
Map<SshFile.Attribute,Object> |
getAttributes(boolean followLinks) |
long |
getLastModified()
Get last modified time in UTC.
|
String |
getName()
Get the file name of the file
|
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?
|
List<SshFile> |
listSshFiles()
List file objects.
|
boolean |
mkdir()
Create directory.
|
boolean |
move(SshFile destination)
Move file.
|
String |
readSymbolicLink() |
void |
setAttribute(SshFile.Attribute attribute,
Object value) |
void |
setAttributes(Map<SshFile.Attribute,Object> attributes) |
boolean |
setLastModified(long time)
Set the last modified time stamp of a file
|
void |
truncate()
Truncate the file to length 0.
|
String getAbsolutePath()
String getName()
Map<SshFile.Attribute,Object> getAttributes(boolean followLinks) throws IOException
IOException
void setAttributes(Map<SshFile.Attribute,Object> attributes) throws IOException
IOException
Object getAttribute(SshFile.Attribute attribute, boolean followLinks) throws IOException
IOException
void setAttribute(SshFile.Attribute attribute, Object value) throws IOException
IOException
String readSymbolicLink() throws IOException
IOException
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()
SshFile
boolean 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 IOException
IOException
- if something wrong happenvoid truncate() throws IOException
IOException
- if something wrong happenboolean move(SshFile destination)
List<SshFile> listSshFiles()
OutputStream createOutputStream(long offset) throws 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
IOException
InputStream createInputStream(long offset) throws 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
IOException
void handleClose() throws IOException
IOException
Copyright © 2008–2013 The Apache Software Foundation. All rights reserved.