-1
创建的目录,所以我的问题是,我想有我目录循环是这样的: https://gyazo.com/74209ec6e199adc3cd84460f7e0d5c2e爪哇 - 循环由数量
我的代码创建显示目录的:
public static File createDir(String path, String name) {
File dir = new File(path + "\\" + name);
dir.mkdir();
return dir;
}
public static void createDirs(String path, int times) {
int x;
for(x=1; x < times+1; x++){
Utils.createDir(path+File.separator, Integer.toString(x));
}
}
public static void main(String[] args){
Utils.createDir(System.getProperties().getProperty("user.home")+File.separator+"Desktop", "Dir");
createDirs(System.getProperties().getProperty("user.home")+File.separator+"Desktop"+File.separator+"Dir", 10);
}
}
但我不知道如何制作它。任何帮助表示赞赏。
编辑:现在看起来是这样的权利: https://gyazo.com/e4877b87c6d9e1910bad7849daafd431
谢谢,它对我很好。 –