2014年8月20日

Java 在给定路径上创建文件,所在文件夹不存在时,如何正确创建。

摘要: String strPath = "E:\\a\\aa\\aaa.txt";File file = new File(strPath);if(!file.exists())){ file.createNewFile();}这段代码,如果 E:\a\aa\ 文件夹不存在,会报错。String strP... 阅读全文

posted @ 2014-08-20 21:38 罡斩 阅读(789) 评论(0) 推荐(0) 编辑

导航