Here you can find the source of makeDirDirs(String dir)
public static void makeDirDirs(String dir)
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { /**// w w w. j a v a 2 s . c o m * If the path to the specified DIRECTORY does not yet exist, * make all the directories up to it. This is the same * as makeFileDirs(), except that you give this one a * directory name instead of a file name. */ public static void makeDirDirs(String dir) { File f = new File(dir); if (!f.exists()) f.mkdirs(); } }