摘要: 判断指定盘符下文件夹是否存在1.判断E:盘下MySQL文件夹是否存在。若不存在,则创建。import java.io.File;public class Test { public static void main(String[] args) { isExist("E:\\MySQL"); } private static void isExist(String path) { File file = new File(path);//判断文件夹是否存在,如果不存在则创建文件夹 if (!file.exists()) { file.mkdir(); } } } 阅读全文
posted @ 2013-10-06 11:32 zhgs_cq 阅读(497) 评论(0) 推荐(0) 编辑