forked from lxm_tools/screw
Merge pull request #40 from xiaohu-liu/b1
path存在多级目录的时候存在创建错误的异常,需要手动创建。 mkdir() 创建此抽象路径名称指定的目录(及只能创建一级的目录,且需要存在父目录) mkdirs()创建此抽象路径指定的目录,包括所有必须但不存在的父目录。(及可以创建多级目录,无论是否存在父目录)
This commit is contained in:
@@ -44,6 +44,8 @@ public interface TypeDialect {
|
||||
if (type == null || map == null || map.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
type = type.toLowerCase();
|
||||
|
||||
if (type.startsWith("date")) {
|
||||
return map.get("date");
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ public class PojoExecute implements Execute {
|
||||
}
|
||||
File pathFile = new File(path);
|
||||
if (!pathFile.exists()) {
|
||||
boolean mkdir = pathFile.mkdir();
|
||||
boolean mkdir = pathFile.mkdirs();
|
||||
if (!mkdir) {
|
||||
throw new ScrewException("create directory failed");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user