Java mkdir makeDir(File dir)

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

Description

make Dir

License

Open Source License

Parameter

Parameter Description
dir a parameter

Declaration

public static void makeDir(File dir) 

Method Source Code


//package com.java2s;

import java.io.File;

public class Main {
    /**//ww w.jav  a2  s. c o  m
     * 
     * @param dir
     */
    public static void makeDir(File dir) {
        if (!dir.exists()) {
            if (!dir.getParentFile().exists()) {
                makeDir(dir.getParentFile());
            }
            dir.mkdir();
        }
    }
}

Related

  1. forceMkdir(File directory)
  2. forceMkdir(File directory)
  3. forceMkdir(String filePath)
  4. forceMkdirs(File file)
  5. makeDir(File dir)
  6. makeDir(File f)
  7. makeDir(File file)
  8. makeDir(File file)
  9. makeDir(File parentDir, String dirName)