public static boolean createFolder(String folderPath) {
boolean ret = true;
try {
File myFilePath = new File(folderPath);
if ((!myFilePath.exists()) && (!myFilePath.isDirectory())) {
ret = myFilePath.mkdirs();
if (!ret) {
System.out.println("创建文件夹出错");
}
}
} catch (Exception e) {
System.out.println("创建文件夹出错");
ret = false;
}
return ret;
}