Java mkdir makeDir(String dir)

Here you can find the source of makeDir(String dir)

Description

make Dir

License

Apache License

Declaration

static public final boolean makeDir(String dir) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.File;

public class Main {
    static public final boolean makeDir(String path, boolean forFile) {
        return makeDir(new File(path), forFile);
    }//from ww  w  .j a  va 2 s .  c o m

    static public final boolean makeDir(File f, boolean forFile) {
        if (!forFile) {
            if (f.exists()) {
                return f.isDirectory();
            }
            return f.mkdirs();
        }
        return makeDir(f.getParentFile(), false);
    }

    static public final boolean makeDir(String dir) {
        return makeDir(dir, false);
    }
}

Related

  1. makeDir(File parentDir, String dirName)
  2. makeDir(File parentFile)
  3. makedir(String containerDir, String name)
  4. makeDir(String dir)
  5. makeDir(String dir)
  6. makeDir(String dir)
  7. MakeDir(String dirName)
  8. MakeDir(String dirpath)
  9. makeDir(String dirPath)