1.获取存储器总大小,可用大小
File path= Environment.getExternalStorageDirectory();
StatFs fs = new StatFs(path.getPath());
long blockcount = fs.getBlockCountLong();
long availblockcount = fs.getAvailableBlocksLong();
long blocksize = fs.getBlockSizeLong();
原文:https://www.cnblogs.com/libing029/p/10699016.html