创建文件

甜菜波波 / 2023-08-03 / 原文

                   String webPath11 =commonPath+File.separator+ name+"_"+i+ ".xlsx";
                    File file = new File(webPath11);
                
//                    // 必须按创建本地目录
//                    if (!file.getParentFile().exists()) { 
//                        // 不存在则创建
//                        file.getParentFile().mkdirs();
//                    }
// 再创建文件 // if (!file.exists()){ // file.createNewFile(); // }