Here you can find the source of mkdirs(String parentName, String childName)
public static boolean mkdirs(String parentName, String childName)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { public static boolean mkdirs(String dirName) { return mkdirs(new File(dirName)); }/*www. j a v a2s .c om*/ public static boolean mkdirs(String parentName, String childName) { return mkdirs(new File(parentName, childName)); } public static boolean mkdirs(File file) { if (file.exists()) { if (!file.isDirectory()) { throw new RuntimeException("File '" + file + "' is not a directory."); } return false; } if (file.mkdirs()) return true; throw new RuntimeException("Failed to create directory '" + file + "'"); } public static boolean exists(String fileName) { return (new File(fileName)).exists(); } }