1、判断文件是否存在,不存在创建文件
File file=new File("C:\\Users\\QPING\\Desktop\\JavaScript\\2.htm");
if(!file.exists())
{
try {
file.createNewFile();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
2、判断文件夹是否存在,不存在创建文件夹