|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdk.apaq.vfs.impl.sftp.SftpNode
public class SftpNode
| Field Summary | |
|---|---|
protected ch.ethz.ssh2.SFTPv3DirectoryEntry |
entry
|
protected SftpFileSystem |
fileSystem
|
protected Path |
path
|
| Constructor Summary | |
|---|---|
SftpNode(SftpFileSystem fileSystem,
Path path,
ch.ethz.ssh2.SFTPv3DirectoryEntry entry)
|
|
| Method Summary | |
|---|---|
boolean |
canRead()
Retrieves information about wether access to read is allowed. |
boolean |
canWrite()
Retrieves information about wether access to read is allowed. |
int |
compareTo(Node node)
Compare this node to another node by comparing their names. |
int |
compareTo(Object o)
|
void |
delete()
Deletes the node. |
boolean |
equals(Node node)
|
String |
getBaseName()
Retrieves the name without suffix like this: myimage.jpg = myimage mybundle.app = mybundle testfile.dit.dat = testfile.dit testdir = testdir |
FileSystem |
getFileSystem()
Retrieves the filesystem which this node belongs to. |
Date |
getLastModified()
Retrieves the date for last modification. |
String |
getName()
Retrieves the name of the node. |
Directory |
getParent()
Retrieves the parent directory of this node. |
Path |
getPath()
|
String |
getSuffix()
Retrieves the suffix of the node or null if no suffix, like this:. |
boolean |
isDirectory()
Checks wether this node is a directory. |
boolean |
isFile()
Checks wether this node is a file. |
boolean |
isHidden()
Checks wether this node is hidden. |
boolean |
isRoot()
|
void |
moveTo(Directory newParent)
Moves this node to a new directory. |
void |
moveTo(Directory newParent,
String newName)
Moves this node to a new directory and renames it. |
protected ch.ethz.ssh2.SFTPv3DirectoryEntry |
resolveChildEntry(String name)
|
void |
setLastModified(Date date)
Sets the date for last modification. |
void |
setName(String name)
Renames the node. |
URI |
toUri()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SftpFileSystem fileSystem
protected Path path
protected ch.ethz.ssh2.SFTPv3DirectoryEntry entry
| Constructor Detail |
|---|
public SftpNode(SftpFileSystem fileSystem,
Path path,
ch.ethz.ssh2.SFTPv3DirectoryEntry entry)
throws IOException
IOException| Method Detail |
|---|
protected ch.ethz.ssh2.SFTPv3DirectoryEntry resolveChildEntry(String name)
throws IOException
IOException
public void moveTo(Directory newParent)
throws IOException
Node
moveTo in interface NodenewParent - The directory the node should be moved to.
IOException - Thrown if an error occurs while the node is being moved.
public void moveTo(Directory newParent,
String newName)
throws IOException
Node
moveTo in interface NodenewParent - The directory the node should be moved to.newName - The new name of the node.
IOException - Thrown if an error occurs while the node is being moved or renamed.
public void setName(String name)
throws IOException
Node
setName in interface Nodename - The new name of the node.
IOException - Thrown if an error occurs while renaming the node.public String getName()
Node
getName in interface Nodepublic String getBaseName()
Node
getBaseName in interface Nodepublic String getSuffix()
Node
getSuffix in interface Node
public Directory getParent()
throws FileNotFoundException
Node
getParent in interface NodeFileNotFoundException - Thrown if parent directory could not be found - would normally only occur if called on the root directory.public FileSystem getFileSystem()
Node
getFileSystem in interface Nodepublic boolean isRoot()
public boolean isDirectory()
Node
isDirectory in interface Nodepublic boolean isFile()
Node
isFile in interface Nodepublic boolean isHidden()
Node
isHidden in interface Nodepublic Date getLastModified()
Node
getLastModified in interface Nodepublic void setLastModified(Date date)
Node
setLastModified in interface Nodedate - The date.public int compareTo(Node node)
Node
compareTo in interface Nodenode - The node to compare with.
public void delete()
throws IOException
Node
delete in interface NodeIOException - Thrown if an error occurs during deletion.public URI toUri()
toUri in interface Nodepublic boolean equals(Node node)
equals in interface Nodepublic Path getPath()
getPath in interface Nodepublic boolean canRead()
Node
canRead in interface Nodepublic boolean canWrite()
Node
canWrite in interface Nodepublic int compareTo(Object o)
compareTo in interface Comparable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||