Java mkdir makeDirDirs(String dir)

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

Description

If the path to the specified DIRECTORY does not yet exist, make all the directories up to it.

License

Open Source License

Declaration

public static void makeDirDirs(String dir) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.*;

public class Main {
    /**// w  w  w.  j  a v  a  2 s  . c  o  m
     * If the path to the specified DIRECTORY does not yet exist,
     * make all the directories up to it.  This is the same
     * as makeFileDirs(), except that you give this one a 
     * directory name instead of a file name.
     */
    public static void makeDirDirs(String dir) {
        File f = new File(dir);
        if (!f.exists())
            f.mkdirs();
    }
}

Related

  1. makeDir(String newDirName)
  2. makeDir(String parent, String child)
  3. makeDir(String path)
  4. makeDir(String path)
  5. makeDirByChild(File file)
  6. makeDirectories(final File file)
  7. makeDirectories(final String location)
  8. makeDirectories(JarFile jar, String eviwareDir)
  9. makeDirectories(String path)