Package PamUtils
Class DiskSpaceFormat
java.lang.Object
PamUtils.DiskSpaceFormat
Functions to get and display disk space in sensible units.
- Author:
 - dg50
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic StringformatSpace(Long space) Format space in bytes,kBytes, etc.static StringgetFileRoot(String path) Get the file system root.static LonggetFreeSpace(String path) Get the amount of space at the specified path or null if the path is not set, etc. 
- 
Constructor Details
- 
DiskSpaceFormat
public DiskSpaceFormat() 
 - 
 - 
Method Details
- 
getFreeSpace
Get the amount of space at the specified path or null if the path is not set, etc.- Parameters:
 file- path- Returns:
 - free space in bytes
 
 - 
getFileRoot
Get the file system root.- Parameters:
 file- path- Returns:
 - file system root, e.g. C:
 
 - 
formatSpace
Format space in bytes,kBytes, etc.- Parameters:
 space-- Returns:
 - String or null if space was null
 
 
 -