方法如下:
public static void judeDirExists(File file)
if (file.exists()) if (file.isDirectory())
System.out.println("dir exists"); }
else System.out.println("the same name file exists, can not create dir"); }41
else System.out.println("dir not exists, create it ..."); 、
file.mkdir();