查询硬盘容量
来源:互联网 发布:ipad儿童游戏 知乎 编辑:程序博客网 时间:2024/05/20 15:40
import java.io.File;public class testimp{ public static void main(String[] args) { getDiskInfo(); } public static void getDiskInfo() { File[] disks=File.listRoots(); for(File file : disks) { System.out.print(file.getPath()+ " "); System.out.print("未使用な容量 = " + file.getFreeSpace() / 1024 / 1024 / 1024 + "G" + " "); System.out.print("使用済な容量 = " + (file.getTotalSpace() - file.getFreeSpace()) / 1024 / 1024 / 1024 +"G" + " "); System.out.print("総容量 = " + file.getTotalSpace() / 1024 / 1024 / 1024 + "G" + " "); System.out.println(); } }}
阅读全文
0 0
- 查询硬盘容量
- 硬盘容量计算
- 硬盘容量换算
- 硬盘容量误差
- 获取硬盘容量
- 硬盘容量计算
- centOS7下实践查询版本/CPU/内存/硬盘容量等硬件信息
- centOS7下实践查询版本/CPU/内存/硬盘容量等硬件信息
- CentOS7下实践查询版本/CPU/内存/硬盘容量等硬件信息
- 硬盘容量如何计算? 硬盘容量说明
- 硬盘容量限制变化历史
- 扩展Vmware硬盘容量
- VM增加硬盘容量
- 扩大vmware硬盘容量
- vmware 硬盘容量扩张
- 扩展VMWare硬盘容量
- VM修改linux硬盘容量
- 扩展VMWare硬盘容量
- 如何快速转发csdn博客?
- Android高效加载大图、多图解决方案,有效避免程序OOM
- Eclipse Theme Color的安装是使用
- Linux之redhat中lvm分区教程
- Laravel在Windows下搭建开发环境Homestead出现的一个大坑Timed out while waiting
- 查询硬盘容量
- Elasticsearch段合并情况
- ES集群服务器CPU负载瞬间飚高分析
- Volley传入请求体不成功的解决方案
- 七、构建镜像,搭建镜像仓库
- Error:(58) Error parsing XML: not well-formed (invalid token)
- 文件流FileStream技术出现的理由漫谈
- Linux系统存储设备的管理与磁盘配额
- linux(2)---校园网开热点