File newFile = new File(fileConfig.getProgramFilePath()+"\\photo\\", eventRules.getId()+"_"+date+".jpg");
// 如果该存储路径不存在则新建存储路径
if (!newFile.getParentFile().exists()) {
newFile.getParentFile().mkdirs();
}
Java automatically creates folders
Guess you like
Origin blog.csdn.net/m0_56095048/article/details/130216883
Recommended
Ranking