Here you can find the source of mkdirs(File dirs)
public static void mkdirs(File dirs) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.IOException; public class Main { /**/*from w ww . ja va 2s .c o m*/ * CreatingUtils all folders at once. */ public static void mkdirs(File dirs) throws IOException { if (dirs.exists()) { if (dirs.isDirectory() == false) { throw new IOException("Directory '" + "' is not a directory."); } return; } if (dirs.mkdirs() == false) { throw new IOException("Unable to create directory '" + dirs + "'."); } } /** * CreatingUtils all folders at once. */ public static void mkdirs(String dirs) throws IOException { mkdirs(new File(dirs)); } }