Here you can find the source of makeDirectory(File file)
public static boolean makeDirectory(File file)
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { public static boolean makeDirectory(File file) { //File parent = file.getParentFile(); //if (parent != null) //{/*from ww w . j a v a 2 s . c o m*/ return file.mkdirs(); //} //return false; } public static boolean makeDirectory(String fileName) { boolean bTmp = false; try { File file = new File(fileName.toString()); makeDirectory(file); bTmp = true; } catch (Exception ex) { bTmp = false; System.out.println(ex.toString()); } return bTmp; } }