摘要: public class Test1 { public static void main(String[] args) { // 统计文件夹大小 long len = getDirLength(new File("D:\\JavaSE")); System.out.println(len + "字节 阅读全文
posted @ 2019-09-16 08:28 码码呼呼 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 建立一个任意路径的对象求取该路径下文件夹的大小:public class Test { public static void main(String[] args) throws IOException {//创建文件对象 File file = new File("D:\\JavaSE"); Sy 阅读全文
posted @ 2019-09-16 08:25 码码呼呼 阅读(213) 评论(0) 推荐(0) 编辑