JAVA 如果文件夹不存在创建新的文件夹

	if (!(new File(desPath)).exists()) {
			(new File(desPath)).mkdirs();
		}
	if (!(new File(desPath)).exists()) {
			(new File(desPath)).mkdir();
		}

注意mkdir()和mkdirs()的区别!

posted @ 2019-11-02 12:21  bH1pJ  阅读(10)  评论(0编辑  收藏  举报