1.获取存储器总大小,可用大小
File path= Environment.getExternalStorageDirectory();
StatFs fs = new StatFs(path.getPath());
long blockcount = fs.getBlockCountLong();
long availblockcount = fs.getAvailableBlocksLong();
long blocksize = fs.getBlockSizeLong();
2022-09-16 11:50:52
1.获取存储器总大小,可用大小
File path= Environment.getExternalStorageDirectory();
StatFs fs = new StatFs(path.getPath());
long blockcount = fs.getBlockCountLong();
long availblockcount = fs.getAvailableBlocksLong();
long blocksize = fs.getBlockSizeLong();