Java Create Directory mkdir(String dirPath, boolean del)

Here you can find the source of mkdir(String dirPath, boolean del)

Description

mkdir

License

Apache License

Declaration

public static void mkdir(String dirPath, boolean del) 

Method Source Code

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

import java.io.File;

public class Main {

    public static void mkdir(String dirPath, boolean del) {
        File dir = new File(dirPath);
        if (dir.exists()) {
            if (del)
                dir.delete();/*from ww w.  java 2  s  .c o  m*/
            else
                return;
        }
        if (!dir.getParentFile().exists()) {
            dir.getParentFile().mkdirs();
        }
    }
}

Related

  1. mkdir(String directory)
  2. mkdir(String directory)
  3. mkDir(String DirectoryName)
  4. mkdir(String directoryName)
  5. mkdir(String dirname)
  6. mkdir(String dname)
  7. mkdir(String folder)
  8. mkdir(String folderName, long lastModifiedDate)
  9. mkdir(String folderpath)