File fileParent = new File("F:"+File.separator+"路测数据缓存"+File.separator+loginName);//新建文件路径
if(!fileParent.exists()){//不存在则创建路径
fileParent.mkdirs();
File file = new File(filePath);
if(!file.exists()){
try {
file.createNewFile();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
if(!fileParent.exists()){//不存在则创建路径
fileParent.mkdirs();
}
//创建文件
String filePath = "F:"+File.separator+"路测数据缓存"+File.separator+loginName+File.separator+"报告_"+cid+".xls";File file = new File(filePath);
if(!file.exists()){
try {
file.createNewFile();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}