Here you can find the source of mkdir(File path)
public static File mkdir(File path)
import java.io.*; import java.nio.channels.*; public class Main{ /**//from ww w . j a va 2s .com * Creates the directories in the specified path. */ public static File mkdir(File path) { assertNotNull("path", path); if (path.mkdirs()) { LOGGER.trace.log("Created directory: ", path.getPath()); } return path; } /** * Creates the directories in the specified path. */ public static String mkdir(String path) { mkdir(new File(path = assertNotEmpty("path", path))); return path; } }