String filePath="E:\\test\\test.txt";
File file=new File(filePath);
File fileParent = file.getParentFile();
if(!fileParent.exists()) {
fileParent.mkdirs();
}
try {
file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
String filePath="E:\\test\\test.txt";
File file=new File(filePath);
File fileParent = file.getParentFile();
if(!fileParent.exists()) {
fileParent.mkdirs();
}
try {
file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}