Here you can find the source of mkdir(final File dir)
public static File mkdir(final File dir) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.IOException; import java.nio.file.Files; public class Main { public static File mkdir(final File dir) throws IOException { if (dir == null) { throw new NullPointerException("argument 'dir' is null"); }//from w w w. ja v a2s. c o m return Files.createDirectories(dir.toPath()).toFile(); } }