Loading api/current.txt +6 −0 Original line number Diff line number Diff line Loading @@ -16597,9 +16597,15 @@ package android.os { public class StatFs { ctor public StatFs(java.lang.String); method public int getAvailableBlocks(); method public long getAvailableBlocksLong(); method public long getAvailableBytes(); method public int getBlockCount(); method public long getBlockCountLong(); method public int getBlockSize(); method public long getBlockSizeLong(); method public int getFreeBlocks(); method public long getFreeBlocksLong(); method public long getFreeBytes(); method public void restat(java.lang.String); } core/java/android/os/StatFs.java +50 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,14 @@ public class StatFs { return (int) mStat.f_bsize; } /** * The size, in bytes, of a block on the file system. This corresponds to * the Unix {@code statfs.f_bsize} field. */ public long getBlockSizeLong() { return mStat.f_bsize; } /** * The total number of blocks on the file system. This corresponds to the * Unix {@code statfs.f_blocks} field. Loading @@ -72,6 +80,14 @@ public class StatFs { return (int) mStat.f_blocks; } /** * The size, in bytes, of a block on the file system. This corresponds to * the Unix {@code statfs.f_bsize} field. */ public long getBlockCountLong() { return mStat.f_blocks; } /** * The total number of blocks that are free on the file system, including * reserved blocks (that are not available to normal applications). This Loading @@ -82,6 +98,24 @@ public class StatFs { return (int) mStat.f_bfree; } /** * 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 statfs.f_bfree} field. Most applications * will want to use {@link #getAvailableBlocks()} instead. */ public long getFreeBlocksLong() { return mStat.f_bfree; } /** * The number of bytes that are free on the file system, including * reserved blocks (that are not available to normal applications). */ public long getFreeBytes() { return mStat.f_bfree * mStat.f_bsize; } /** * The number of blocks that are free on the file system and available to * applications. This corresponds to the Unix {@code statfs.f_bavail} field. Loading @@ -89,4 +123,20 @@ public class StatFs { public int getAvailableBlocks() { return (int) mStat.f_bavail; } /** * The number of blocks that are free on the file system and available to * applications. This corresponds to the Unix {@code statfs.f_bavail} field. */ public long getAvailableBlocksLong() { return mStat.f_bavail; } /** * The number of bytes that are free on the file system and available to * applications. */ public long getAvailableBytes() { return mStat.f_bavail * mStat.f_bsize; } } Loading
api/current.txt +6 −0 Original line number Diff line number Diff line Loading @@ -16597,9 +16597,15 @@ package android.os { public class StatFs { ctor public StatFs(java.lang.String); method public int getAvailableBlocks(); method public long getAvailableBlocksLong(); method public long getAvailableBytes(); method public int getBlockCount(); method public long getBlockCountLong(); method public int getBlockSize(); method public long getBlockSizeLong(); method public int getFreeBlocks(); method public long getFreeBlocksLong(); method public long getFreeBytes(); method public void restat(java.lang.String); }
core/java/android/os/StatFs.java +50 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,14 @@ public class StatFs { return (int) mStat.f_bsize; } /** * The size, in bytes, of a block on the file system. This corresponds to * the Unix {@code statfs.f_bsize} field. */ public long getBlockSizeLong() { return mStat.f_bsize; } /** * The total number of blocks on the file system. This corresponds to the * Unix {@code statfs.f_blocks} field. Loading @@ -72,6 +80,14 @@ public class StatFs { return (int) mStat.f_blocks; } /** * The size, in bytes, of a block on the file system. This corresponds to * the Unix {@code statfs.f_bsize} field. */ public long getBlockCountLong() { return mStat.f_blocks; } /** * The total number of blocks that are free on the file system, including * reserved blocks (that are not available to normal applications). This Loading @@ -82,6 +98,24 @@ public class StatFs { return (int) mStat.f_bfree; } /** * 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 statfs.f_bfree} field. Most applications * will want to use {@link #getAvailableBlocks()} instead. */ public long getFreeBlocksLong() { return mStat.f_bfree; } /** * The number of bytes that are free on the file system, including * reserved blocks (that are not available to normal applications). */ public long getFreeBytes() { return mStat.f_bfree * mStat.f_bsize; } /** * The number of blocks that are free on the file system and available to * applications. This corresponds to the Unix {@code statfs.f_bavail} field. Loading @@ -89,4 +123,20 @@ public class StatFs { public int getAvailableBlocks() { return (int) mStat.f_bavail; } /** * The number of blocks that are free on the file system and available to * applications. This corresponds to the Unix {@code statfs.f_bavail} field. */ public long getAvailableBlocksLong() { return mStat.f_bavail; } /** * The number of bytes that are free on the file system and available to * applications. */ public long getAvailableBytes() { return mStat.f_bavail * mStat.f_bsize; } }