public class DirectoryContents
extends java.lang.Object
Constructor and Description |
---|
DirectoryContents(java.lang.String name)
Initialize the new instance with the directory's name.
|
DirectoryContents(java.lang.String name,
FileInfo[] fileInfos)
Initialize the new instance with the directory's name and its content
|
DirectoryContents(java.lang.String name,
java.util.List<FileInfo> fileInfos)
Initialize the new instance with the directory's name and its content
|
Modifier and Type | Method and Description |
---|---|
void |
addFileInfo(FileInfo info)
Adds the given file info to the list of contained file info objects
|
FileInfo[] |
getContainedFiles()
Returns an array of information objects on all files contained in this
directory
|
java.lang.String |
getDirectoryName()
Returns the name of the directory this object represents
|
protected java.lang.String |
getDirName() |
protected java.util.List<FileInfo> |
getFiles() |
protected java.lang.String |
inspectString()
Returns a display string for an inspector.
|
int |
numberOfContainedFiles()
Returns the number of files that are directly exist in this directory
|
protected void |
setDirName(java.lang.String newValue) |
protected void |
setFiles(java.util.List<FileInfo> newValue) |
java.lang.String |
toString() |
public DirectoryContents(java.lang.String name)
public DirectoryContents(java.lang.String name, FileInfo[] fileInfos)
public DirectoryContents(java.lang.String name, java.util.List<FileInfo> fileInfos)
public java.lang.String getDirectoryName()
public int numberOfContainedFiles()
public FileInfo[] getContainedFiles()
public void addFileInfo(FileInfo info)
public java.lang.String toString()
toString
in class java.lang.Object
protected java.lang.String getDirName()
protected void setDirName(java.lang.String newValue)
protected java.util.List<FileInfo> getFiles()
protected void setFiles(java.util.List<FileInfo> newValue)
protected java.lang.String inspectString()