Here you can find the source of mkdir(File f)
public static void mkdir(File f) throws IOException
//package com.java2s; // Licensed under the Academic Free License version 3.0 import java.io.*; public class Main { /**/*from w w w . j av a 2 s. co m*/ * Same as File.mkdirs() exception IOException is thrown on error. */ public static void mkdir(File f) throws IOException { if (f.exists() && f.isDirectory()) return; if (!f.mkdirs()) throw new IOException("Cannot mkdir: " + f); } }