|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectJFile
Directory
Directory of JFiles. A Directory is a JFile that maintains a table of the JFiles it contains
| Field Summary |
| Fields inherited from class JFile |
separator |
| Constructor Summary | |
Directory(String name,
User creator,
Directory parent)
Construct a Directory. |
|
| Method Summary | |
void |
addJFile(String name,
JFile afile)
Add a JFile to this Directory. |
String[] |
getFileNames()
Get the contents of this Directory as an array of the file names, each of which is a String. |
int |
getSize()
The size of a directory is the number of TextFiles it contains. |
String |
getSuffix()
Suffix used for printing Directory names; we define it as the (system dependent) name separator used in path names. |
JFile |
retrieveJFile(String filename)
Get a JFile in this Directory, by name . |
| Methods inherited from class JFile |
getCreateDate, getModDate, getName, getOwner, getParent, getPathName, isRoot, setModDate, setOwner, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Directory(String name,
User creator,
Directory parent)
name - the name for this Directory (in its parent Directory)creator - the owner of this new Directoryparent - the Directory in which this Directory lives.| Method Detail |
public void addJFile(String name,
JFile afile)
name - the name under which this JFile is added.afile - the JFile to add.public String[] getFileNames()
public int getSize()
getSize in class JFilepublic String getSuffix()
getSuffix in class JFilepublic JFile retrieveJFile(String filename)
filename - the name of the JFile to find.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||