提交 1b41cb81 authored 作者: Thomas Mueller's avatar Thomas Mueller

Improved compatibility with the Java 7 FileSystem abstraction.

上级 04767312
...@@ -292,12 +292,12 @@ public class FileUtils { ...@@ -292,12 +292,12 @@ public class FileUtils {
* @param dir the directory name * @param dir the directory name
*/ */
public static void createDirectories(String dir) { public static void createDirectories(String dir) {
if (dir != null && !FileUtils.exists(dir)) {
String parent = FileUtils.getParent(dir); String parent = FileUtils.getParent(dir);
if (parent != null && !FileUtils.exists(parent)) {
createDirectories(parent); createDirectories(parent);
}
createDirectory(dir); createDirectory(dir);
} }
}
/** /**
* Copy a file from one directory to another, or to another file. * Copy a file from one directory to another, or to another file.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论