src/org/nutz/lang/Files.java
public static File createDirIfNoExists(String path) {
        String thePath = Disks.absolute(path);
        if (null == thePath)
            thePath = Disks.normalize(path);
        File f = new File(thePath);
        if (!f.exists()) {
            boolean flag = Files.makeDir(f);
            if (!flag) {
                Logs.get().warnf("create filepool dir(%s) fail!!", f.getPath());
            }
        }
        if (!f.isDirectory())
            throw Lang.makeThrow("'%s' should be a directory or don't have permission to create it!", path);
        return f;
    }
public static File createDirIfNoExists(String path) {
        String thePath = Disks.absolute(path);
        if (null == thePath)
            thePath = Disks.normalize(path);
        File f = new File(thePath);
        if (!f.exists()) {
            boolean flag = Files.makeDir(f);
            if (!flag) {
                Logs.get().warnf("create filepool dir(%s) fail!!", f.getPath());
            }
        }
        if (!f.isDirectory())
            throw Lang.makeThrow("'%s' should be a directory or don't have permission to create it!", path);
        return f;
    }
试图生成一个目录对象，如果文件不存在则创建它。 如果给出的 PATH 是相对路径 则会在 CLASSPATH
中寻找，如果未找到，则会在用户主目录中创建这个目录

@param path
文件路径，可以以 ~ 开头，也可以是 CLASSPATH 下面的路径
@return 文件对象