Here you can find the source of mkdirs(final File dirs)
public static void mkdirs(final File dirs) throws IOException
//package com.java2s; import java.io.File; import java.io.IOException; public class Main { private static final String MSG_NOT_A_DIRECTORY = "Not a directory: "; private static final String MSG_CANT_CREATE = "Can't create: "; public static void mkdirs(String dirs) throws IOException { mkdirs(new File(dirs)); }/* www. j a v a 2s . c o m*/ /** * Creates all folders at once. */ public static void mkdirs(final File dirs) throws IOException { if (dirs.exists()) { if (!dirs.isDirectory()) { throw new IOException(MSG_NOT_A_DIRECTORY + dirs); } return; } if (!dirs.mkdirs()) { throw new IOException(MSG_CANT_CREATE + dirs); } } }