public long checkSpace(){
String path = System.getProperty("user.dir");
System.out.println("path=="+path);
File file = new File(path);
long freeSpace = file.getFreeSpace();
long diskSpace = freeSpace / 1024 / 1024/1024;
return diskSpace;
}
版权声明:本文为txwy12原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。