package com.basic.security;
|
|
import java.io.File;
|
|
public class Main {
|
|
public static void main(String[] args) {
|
listFile(new File("C:\\Users\\xiuxi\\go\\src"));
|
}
|
|
private static void listFile(File file) {
|
String name = file.getName();
|
String fullName = file.getAbsolutePath();
|
if (file.isDirectory()) {
|
if (".git".equals(name)) {
|
// file.renameTo(new File(fullName+"1"));
|
System.out.println("Main.listFile " + fullName);
|
} else {
|
File[] files = file.listFiles();
|
for (File f : files) {
|
listFile(f);
|
}
|
}
|
}
|
if (file.isFile()) {
|
double mbSize = file.length()*1.0/1024/1024;
|
if (mbSize > 90
|
//|| name.equals("pack-b7d6b9c8fc6c33dfd765fa5cb76f235b3240c403.pack")
|
) {
|
System.out.println("Main.listFile " + fullName + " " + mbSize);
|
}
|
}
|
}
|
|
|
}
|