private static String path = null;
public static void createDirectory() {
path = "/usr/local/photo/" + LocalDate.now().toString().replace("-", "/") + "/";
File personFile = new File(path);
personFile = new File(path + "persons/");
if (!personFile.isFile()) {
List<File> fileList = new ArrayList<>();
fileList.add(personFile);
fileList.add(new File(path + "car/"));
fileList.add(new File(path + "other/"));
for (int i = 0; i < fileList.size(); i++) {
fileList.get(i).mkdirs();
log.info("创建文件夹: " + fileList.get(i).getName());
}
}
}