Here you can find the source of mkdirsIfNotExists(String pathname)
public static boolean mkdirsIfNotExists(String pathname)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { public static boolean mkdirsIfNotExists(String pathname) { File file = new File(pathname); if (!file.isDirectory()) { if (!file.mkdirs()) { System.err.println("fail to create directory: " + pathname); return false; }// w w w .j a va 2 s . co m } return true; } }