存储设备都是分块的,获取一共有多少块,然后算出来每一块的大小就能得到总的大小
Formatter类的formatFileSize内部能自动将一个比特大小的值转换成M,G,K等
static String formatFileSize(Context context, long number)
Formats a content size to be in the form of bytes, kilobytes, megabytes, etc
存储设备都是分块的,获取一共有多少块,然后算出来每一块的大小就能得到总的大小
Formatter类的formatFileSize内部能自动将一个比特大小的值转换成M,G,K等
static String formatFileSize(Context context, long number)
Formats a content size to be in the form of bytes, kilobytes, megabytes, etc