Here you can find the source of createDir(String dir, boolean ignoreIfExitst)
public static void createDir(String dir, boolean ignoreIfExitst) throws IOException
//package com.java2s; import java.io.File; import java.io.IOException; public class Main { public static void createDir(String dir, boolean ignoreIfExitst) throws IOException { File file = new File(dir); if (ignoreIfExitst && file.exists()) { return; }/*w w w . ja va2 s . c o m*/ if (file.mkdir() == false) { throw new IOException("Cannot create the directory = " + dir); } } }