|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object JFile 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 JFiles it contains. |
String |
getSuffix()
Suffix used for printing Directory names; we define it as the (system dependent) name separator used in path names. |
void |
removeJFile(String filename)
Remove a JFile in this Directory, by name . |
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 Directory.parent
- 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 JFile
public String getSuffix()
getSuffix
in class JFile
public void removeJFile(String filename)
filename
- the name of the JFile to removepublic 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 |