Methods Summary |
---|
private static android.system.StructStatVfs | doStat(java.lang.String path)
try {
return Os.statvfs(path);
} catch (ErrnoException e) {
throw new IllegalArgumentException("Invalid path: " + path, e);
}
|
public int | getAvailableBlocks()
return (int) mStat.f_bavail;
|
public long | getAvailableBlocksLong()The number of blocks that are free on the file system and available to
applications. This corresponds to the Unix {@code statvfs.f_bavail} field.
return mStat.f_bavail;
|
public long | getAvailableBytes()The number of bytes that are free on the file system and available to
applications.
return mStat.f_bavail * mStat.f_bsize;
|
public int | getBlockCount()
return (int) mStat.f_blocks;
|
public long | getBlockCountLong()The total number of blocks on the file system. This corresponds to the
Unix {@code statvfs.f_blocks} field.
return mStat.f_blocks;
|
public int | getBlockSize()
return (int) mStat.f_bsize;
|
public long | getBlockSizeLong()The size, in bytes, of a block on the file system. This corresponds to
the Unix {@code statvfs.f_bsize} field.
return mStat.f_bsize;
|
public int | getFreeBlocks()
return (int) mStat.f_bfree;
|
public long | getFreeBlocksLong()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 {@code statvfs.f_bfree} field. Most applications
will want to use {@link #getAvailableBlocks()} instead.
return mStat.f_bfree;
|
public long | getFreeBytes()The number of bytes that are free on the file system, including reserved
blocks (that are not available to normal applications). Most applications
will want to use {@link #getAvailableBytes()} instead.
return mStat.f_bfree * mStat.f_bsize;
|
public long | getTotalBytes()The total number of bytes supported by the file system.
return mStat.f_blocks * mStat.f_bsize;
|
public void | restat(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.
mStat = doStat(path);
|