org.pf.file
Class DirectoryContents

java.lang.Object
  extended by org.pf.file.DirectoryContents

public class DirectoryContents
extends java.lang.Object

Represents one directory path with all its contained files.

Version:
1.0
Author:
Manfred Duchrow

Constructor Summary
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
 
Method Summary
 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
 int numberOfContainedFiles()
          Returns the number of files that are directly exist in this directory
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryContents

public DirectoryContents(java.lang.String name)
Initialize the new instance with the directory's name.


DirectoryContents

public DirectoryContents(java.lang.String name,
                         FileInfo[] fileInfos)
Initialize the new instance with the directory's name and its content

Method Detail

getDirectoryName

public java.lang.String getDirectoryName()
Returns the name of the directory this object represents


numberOfContainedFiles

public int numberOfContainedFiles()
Returns the number of files that are directly exist in this directory


getContainedFiles

public FileInfo[] getContainedFiles()
Returns an array of information objects on all files contained in this directory


addFileInfo

public void addFileInfo(FileInfo info)
Adds the given file info to the list of contained file info objects