Here you can find the source of mkdir(File dir)
public static void mkdir(File dir)
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { public static void mkdir(File dir) { if (dir.exists()) { if (!dir.isDirectory()) { throw new IllegalArgumentException("specified path is already exists," + " and not a directory. path=[" + dir.getAbsolutePath() + "]"); }//from w ww . j a v a 2 s . com } else if (!dir.mkdirs()) { throw new RuntimeException("failed to create directory. path=[" + dir + "]"); } } }