Here you can find the source of mkDir(String path)
public static boolean mkDir(String path)
//package com.java2s; // This file is part of MarMoT, which is licensed under GPLv3. import java.io.File; public class Main { public static boolean mkDir(String path) { File file = new File(path); if (file.exists()) { if (!file.isDirectory()) { throw new RuntimeException("File exists and is not a directory: " + path); }/*w w w. java2 s . c om*/ return true; } return file.mkdirs(); } }