|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--javatools.io.DirectoryGetter
It is a class that can get all files and subdirectories of a given directory.
| Field Summary | |
protected java.io.File |
dirRef
Represents the directory itself. |
protected java.io.File[] |
fileList
Represents the list of contained files. |
protected java.io.File[] |
subdirList
Represents the list of subdirectories. |
| Constructor Summary | |
DirectoryGetter()
Creates new DirectoryGetter |
|
DirectoryGetter(java.io.File dirFile)
Creates a new DirectoryGetter. |
|
DirectoryGetter(java.lang.String path)
Creates a new DirectoryGetter. |
|
| Method Summary | |
java.io.File |
getFile()
Returns the directory itself. |
java.io.File[] |
getFiles()
Returns an array of contained files. |
DirectoryGetter[] |
getSubdirGetters()
Returns an array of DirectoryGetter for each subdirectory. |
java.io.File[] |
getSubdirs()
Returns an array of subdirectories. |
protected void |
scanDir()
Scans the directory to retrieve files and subdirectories. |
void |
setDirectoryFile(java.io.File dirFile)
Sets the directory file. |
void |
setDirectoryPath(java.lang.String path)
Sets the directory path. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.io.File[] subdirList
protected java.io.File[] fileList
protected java.io.File dirRef
| Constructor Detail |
public DirectoryGetter()
public DirectoryGetter(java.io.File dirFile)
dirFile - It represents the directory to scan.public DirectoryGetter(java.lang.String path)
path - The path of the directory.| Method Detail |
public java.io.File getFile()
public java.io.File[] getSubdirs()
throws java.io.IOException
java.io.IOException - If something goes wrong.
public java.io.File[] getFiles()
throws java.io.IOException
java.io.IOException - If something goes wrong.
public DirectoryGetter[] getSubdirGetters()
throws java.io.IOException
java.io.IOException - If something goes wrong.public void setDirectoryFile(java.io.File dirFile)
dirFile - The file representing the scanning directory.public void setDirectoryPath(java.lang.String path)
path - The path of the directory.
protected void scanDir()
throws java.io.IOException
java.io.IOException - If something goes wrong.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||