Build 1.0_r1(from source)

android.os
Class StatFs

java.lang.Object
  extended by android.os.StatFs

public class StatFs
extends Object

Retrieve overall information about the space on a filesystem. This is a Wrapper for Unix statfs().


Constructor Summary
StatFs(String path)
          Construct a new StatFs for looking at the stats of the filesystem at path.
 
Method Summary
protected  void finalize()
          Called by the virtual machine when there are no longer any (non-weak) references to the receiver.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatFs

public StatFs(String path)
Construct a new StatFs for looking at the stats of the filesystem at path. Upon construction, the stat of the file system will be performed, and the values retrieved available from the methods on this class.

Parameters:
path - A path in the desired file system to state.
Method Detail

restat

public void restat(String path)
Perform a restat of the file system referenced by this object. This is the same as re-constructing the object with the same file system path, and the new stat values are available upon return.


finalize

protected void finalize()
Description copied from class: Object
Called by the virtual machine when there are no longer any (non-weak) references to the receiver. Subclasses can use this facility to guarantee that any associated resources are cleaned up before the receiver is garbage collected. Uncaught exceptions which are thrown during the running of the method cause it to terminate immediately, but are otherwise ignored.

Note: The virtual machine assumes that the implementation in class Object is empty.

Overrides:
finalize in class Object

getBlockSize

public int getBlockSize()
The size, in bytes, of a block on the file system. This corresponds to the Unix statfs.f_bsize field.


getBlockCount

public int getBlockCount()
The total number of blocks on the file system. This corresponds to the Unix statfs.f_blocks field.


getFreeBlocks

public int getFreeBlocks()
The total number of blocks that are free on the file system, including reserved blocks (that are not available to normal applications). This corresponds to the Unix statfs.f_bfree field. Most applications will want to use getAvailableBlocks() instead.


getAvailableBlocks

public int getAvailableBlocks()
The number of blocks that are free on the file system and available to applications. This corresponds to the Unix statfs.f_bavail field.


Build 1.0_r1(from source)

Please submit a feedback, bug or feature