|
Spreadsheet Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--corpus.fileIO.Directory
Used to represent a file system directory. Basically a specialised version of File.
File
Constructor Summary | |
Directory(java.io.File directory)
Create this Directory Object for the given File |
|
Directory(java.lang.String directoryName)
Create this Directory Object from a path to a file system directory. |
Method Summary | |
static Directory |
browse(Directory root,
java.lang.String title)
|
java.lang.String[] |
contentsPaths()
Creates a String[] containing the path for each file/directory in this Directory. |
static Directory |
create(java.lang.String path)
Create a new directory for the given path. |
java.lang.String[] |
getFiles()
|
java.lang.String |
getName()
|
java.lang.String |
getParentPath()
|
java.lang.String |
getPath()
|
java.lang.String[] |
getSubDirs()
|
java.lang.String[] |
getSubFiles()
Used if no files can be found in the current directory |
static void |
main(java.lang.String[] args)
This program lists the contents of a directory specified by the user. |
int |
numSubDirs()
|
int |
numSubFiles()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Directory(java.io.File directory)
directory
- a File which is also a Directory.public Directory(java.lang.String directoryName)
Method Detail |
public static Directory create(java.lang.String path)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getPath()
public java.lang.String getName()
public java.lang.String getParentPath()
public java.lang.String[] getSubDirs()
public int numSubDirs()
public java.lang.String[] getFiles()
public int numSubFiles()
public java.lang.String[] getSubFiles()
public java.lang.String[] contentsPaths()
public static Directory browse(Directory root, java.lang.String title)
public static void main(java.lang.String[] args)
|
Spreadsheet Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |