net.aerith.misao.io
Class FileFolder

java.lang.Object
  |
  +--net.aerith.misao.io.FileFolder

public class FileFolder
extends java.lang.Object
implements Folder

The FileFolder represents a directory on the real file system.


Field Summary
protected  java.io.File file
          The File object.
protected  java.util.Vector folder_list
          The folder hierarchy.
 
Constructor Summary
FileFolder(java.io.File file, java.util.Vector folder_list)
          Constructs a FileFolder.
 
Method Summary
 boolean exists()
          Returns true if this folder really exists.
 java.io.File getFile()
          Gets the File object.
 Folder getFolder(java.lang.String name)
          Gets the sub folder.
 java.util.Vector getHierarchy()
          Gets the folder hierarchy.
 java.lang.String getID()
          Gets the ID of this folder.
 java.lang.String getName()
          Gets the name of this folder.
 boolean isFolder()
          Returns true if this folder is a real folder.
 Folder[] list()
          Gets the list of sub folders.
protected  java.lang.String paramString()
          Returns a raw string representation of the state of this object, for debugging use.
 java.lang.String toString()
          Returns a string representation of the state of this object, for debugging use.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

file

protected java.io.File file
The File object.

folder_list

protected java.util.Vector folder_list
The folder hierarchy.
Constructor Detail

FileFolder

public FileFolder(java.io.File file,
                  java.util.Vector folder_list)
Constructs a FileFolder.
Parameters:
file - the File object of the folder.
folder_list - the leading folder hierarchy.
Method Detail

getFile

public java.io.File getFile()
Gets the File object.
Returns:
the File object.

getHierarchy

public java.util.Vector getHierarchy()
Gets the folder hierarchy.
Specified by:
getHierarchy in interface Folder
Returns:
the folder hierarchy.

getID

public java.lang.String getID()
Gets the ID of this folder.
Specified by:
getID in interface Folder
Returns:
the ID of this folder.

getName

public java.lang.String getName()
Gets the name of this folder.
Specified by:
getName in interface Folder
Returns:
the name of this folder.

getFolder

public Folder getFolder(java.lang.String name)
Gets the sub folder.
Specified by:
getFolder in interface Folder
Parameters:
name - the name of the sub folder.
Returns:
the sub folder.

isFolder

public boolean isFolder()
Returns true if this folder is a real folder.
Specified by:
isFolder in interface Folder
Returns:
true if this folder is a real folder.

exists

public boolean exists()
Returns true if this folder really exists.
Specified by:
exists in interface Folder
Returns:
true if this folder really exists.

list

public Folder[] list()
Gets the list of sub folders.
Specified by:
list in interface Folder
Returns:
the list of sub folders.

paramString

protected java.lang.String paramString()
Returns a raw string representation of the state of this object, for debugging use. It should be invoked from toString method of the subclasses.
Returns:
a string representation of the state of this object.

toString

public java.lang.String toString()
Returns a string representation of the state of this object, for debugging use.
Specified by:
toString in interface Folder
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the state of this object.