Here you can find the source of mkdir(File file)
public static void mkdir(File file)
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { public static void mkdir(String dir) { File file = new File(dir); mkdir(file);// ww w.j av a2 s .co m } public static void mkdir(File file) { if (file.exists()) { return; } File pFile = file.getParentFile(); if (pFile != null) { mkdir(pFile); } // file.mkdir(); } }