FileDocCategorySizeDatePackage
StatFs.javaAPI DocAndroid 1.5 API2624Wed May 06 22:41:56 BST 2009android.os

StatFs

public class StatFs extends Object
Retrieve overall information about the space on a filesystem. This is a Wrapper for Unix statfs().

Fields Summary
private int
mNativeContext
Constructors Summary
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.

param
path A path in the desired file system to state.

 native_setup(path); 
Methods Summary
protected voidfinalize()

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

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

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

public native intgetFreeBlocks()
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 {@link #getAvailableBlocks()} instead.

private native voidnative_finalize()

private native voidnative_restat(java.lang.String path)

private native voidnative_setup(java.lang.String path)

public voidrestat(java.lang.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.

 native_restat(path);