|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectau.com.asmanit.utility.DirSizer
This class determines the size of a given directory. Copyright 2005 Asman IT Consulting
| Constructor Summary | |
DirSizer()
Generate a DirSizer without specifying the directory - a directory must be specified before getDirSize() can be called. |
|
DirSizer(java.io.File dir)
Generate a DirSizer supplying the directory as a file. |
|
DirSizer(java.lang.String dirName)
Generate a DirSizer supplying the directory as a string. |
|
| Method Summary | |
java.io.File |
getDir()
Returns the directory that will be measured |
long |
getDirSize()
Return the size of the chosen directory's contents. |
boolean |
isFollowSymlinks()
Return whether the DirSizer will follow symlinks when sizing a directory |
void |
setDir(java.io.File dir)
Set the directory to be measured. |
void |
setFollowSymlinks(boolean followSymlinks)
Set whether the DirSizer should follow symlinks when sizing a directory. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DirSizer()
public DirSizer(java.lang.String dirName)
dirName - The name of the directory
java.lang.IllegalArgumentException - if the directory does not existpublic DirSizer(java.io.File dir)
dir - The file representing the directory
java.lang.IllegalArgumentException - if the directory does not exist| Method Detail |
public java.io.File getDir()
public void setDir(java.io.File dir)
dir - The directory to measure
java.lang.IllegalArgumentException - if the directory does not existpublic boolean isFollowSymlinks()
public void setFollowSymlinks(boolean followSymlinks)
followSymlinks - the value of the "follow symlinks" optionpublic long getDirSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||