|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.taskdefs.optional.ssh.Directory
public class Directory
A helper object for Scp representing a directory in a file system.
Constructor Summary | |
---|---|
Directory(java.io.File directory)
Constructor for a Directory. |
|
Directory(java.io.File directory,
Directory parent)
Constructor for a Directory. |
Method Summary | |
---|---|
void |
addDirectory(Directory directory)
Add a directory to the child directories. |
void |
addFile(java.io.File file)
Add a file to the list of files. |
java.util.Iterator |
directoryIterator()
Get an iterator over the child Directories. |
boolean |
equals(java.lang.Object obj)
The equality method. |
java.util.Iterator |
filesIterator()
Get an iterator over the files. |
int |
fileSize()
Get the number of files in the files attribute. |
Directory |
getChild(java.io.File dir)
Get a child directory of this directory. |
java.io.File |
getDirectory()
Get the directory file. |
Directory |
getParent()
Get the parent Directory. |
java.lang.String[] |
getPath()
Get the path components of this directory. |
static java.lang.String[] |
getPath(java.lang.String thePath)
Convert a file path to an array of path components. |
int |
hashCode()
The hashcode method. |
boolean |
isRoot()
Is this a root Directory? |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Directory(java.io.File directory)
directory
- a directory.public Directory(java.io.File directory, Directory parent)
directory
- a directoryparent
- a parent DirectoryMethod Detail |
---|
public void addDirectory(Directory directory)
directory
- a Directorypublic void addFile(java.io.File file)
file
- a file to addpublic java.util.Iterator directoryIterator()
public java.util.Iterator filesIterator()
public Directory getParent()
public boolean isRoot()
public java.io.File getDirectory()
public Directory getChild(java.io.File dir)
dir
- the directory to look for
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to compare to
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String[] getPath()
public static java.lang.String[] getPath(java.lang.String thePath)
thePath
- the file path string to convert
public int fileSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |