public class StatFs extends Object
Constructor and Description |
---|
StatFs(String path)
Construct a new StatFs for looking at the stats of the filesystem at
path . |
Modifier and Type | Method and Description |
---|---|
int |
getAvailableBlocks()
The number of blocks that are free on the file system and available to
applications.
|
int |
getBlockCount()
The total number of blocks on the file system.
|
int |
getBlockSize()
The size, in bytes, of a block on the file system.
|
int |
getFreeBlocks()
The total number of blocks that are free on the file system, including
reserved blocks (that are not available to normal applications).
|
void |
restat(String path)
Perform a restat of the file system referenced by this object.
|
public StatFs(String path)
path
. Upon construction, the stat of the file system will be
performed, and the values retrieved available from the methods on this
class.path
- path in the desired file system to stat.public void restat(String path)
public int getBlockSize()
statfs.f_bsize
field.public int getBlockCount()
statfs.f_blocks
field.public int getFreeBlocks()
statfs.f_bfree
field. Most applications
will want to use getAvailableBlocks()
instead.public int getAvailableBlocks()
statfs.f_bavail
field.