public long getTotalSpace ( ) { try { StructStatVfs sb = Libcore . os . statvfs ( path ) ; return sb . f_blocks * sb . f_bsize ; // total block count * block size in bytes. } catch ( ErrnoException errnoException ) { return 0 ; } }
Returns the total size in bytes of the partition containing this path . Returns 0 if this path does not exist .