今天用到的,就随手进入我的囊中。
String outPutPath="F:\\a.txt";File fileNew = new File(outPutPath);
File fileParent = fileNew.getParentFile();
if(!fileParent.exists()){
fileParent.mkdirs();
}
fileNew.createNewFile();
String outPutPath="F:\\a.txt";File fileNew = new File(outPutPath);
File fileParent = fileNew.getParentFile();
if(!fileParent.exists()){
fileParent.mkdirs();
}
fileNew.createNewFile();