From cb251db69dff99d4a68ee5654cf575af7460e852 Mon Sep 17 00:00:00 2001 From: Arno Date: Wed, 27 Mar 2019 16:26:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/java/DTest.java | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/test/java/DTest.java b/src/test/java/DTest.java index bf2addbd7..1aa9f27db 100644 --- a/src/test/java/DTest.java +++ b/src/test/java/DTest.java @@ -19,25 +19,7 @@ public class DTest { public static void main(String[] args) throws Exception { - File[] files = File.listRoots(); - long freeSpace = 0; - long useAbleSpace = 0; - long totalSpace = 0; - for (File file : files) { - long free = file.getFreeSpace(); - freeSpace += free; - long total = file.getTotalSpace(); - totalSpace += total; - useAbleSpace += total - free; - System.out.println(file.getPath()); - System.out.println(FileUtil.readableFileSize(free)); - System.out.println(FileUtil.readableFileSize(total - free)); - System.out.println(FileUtil.readableFileSize(total)); - System.out.println("-------------------------"); - } - System.out.println(FileUtil.readableFileSize(freeSpace)); - System.out.println(FileUtil.readableFileSize(useAbleSpace)); - System.out.println(FileUtil.readableFileSize(totalSpace)); + } private static void printTrack() {