Here you can find the source of mkdir(File dir)
public static void mkdir(File dir) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.IOException; public class Main { /**/*from ww w . jav a 2 s . c om*/ * CreatingUtils single folder. */ public static void mkdir(String dir) throws IOException { mkdir(new File(dir)); } /** * CreatingUtils single folders. */ public static void mkdir(File dir) throws IOException { if (dir.exists()) { if (dir.isDirectory() == false) { throw new IOException("Destination '" + "' is not a directory."); } return; } if (dir.mkdir() == false) { throw new IOException("Unable to create directory '" + dir + "'."); } } }