Java Directory Create mkdir(File dir)

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

Description

mkdir

License

Open Source License

Declaration

public static void mkdir(File dir) 

Method Source Code


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

import java.io.File;

public class Main {

    public static void mkdir(File dir) {
        if (dir.exists()) {
            if (!dir.isDirectory()) {
                dir.delete();// w  ww . j  av a  2s .c  o m
                dir.mkdir();
            }
        } else {
            mkdir(dir.getParentFile());
            dir.mkdir();
        }
    }
}

Related

  1. mkdir(File d)
  2. mkdir(File dir)
  3. mkdir(File dir)
  4. mkdir(File dir)
  5. mkdir(File dir)
  6. mkdir(File dir)
  7. mkdir(File dir)
  8. mkDir(File dir)
  9. mkDir(File dir)