Class Directory
java.lang.Object
org.apache.tools.ant.taskdefs.optional.ssh.Directory
A helper object for Scp representing a directory in a file system.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDirectory
(Directory directory) Add a directory to the child directories.void
Add a file to the list of files.Get an iterator over the child Directories.boolean
The equality method.Get an iterator over the files.int
fileSize()
Get the number of files in the files attribute.Get a child directory of this directory.Get the directory file.Get the parent Directory.String[]
getPath()
Get the path components of this directory.static String[]
Convert a file path to an array of path components.int
hashCode()
The hashcode method.boolean
isRoot()
Is this a root Directory?
-
Constructor Details
-
Directory
-
Directory
-
-
Method Details
-
addDirectory
Add a directory to the child directories.- Parameters:
directory
- a Directory
-
addFile
-
directoryIterator
-
filesIterator
-
getParent
-
isRoot
public boolean isRoot()Is this a root Directory?- Returns:
- true if there is no parent Directory
-
getDirectory
-
getChild
-
equals
-
hashCode
-
getPath
Get the path components of this directory.- Returns:
- the path components as an array of strings.
-
getPath
-
fileSize
public int fileSize()Get the number of files in the files attribute.- Returns:
- the number of files
-