Here you can find the source of makeDirectory(File file)
public static boolean makeDirectory(File file)
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { public static boolean makeDirectory(File file) { File parent = file.getParentFile(); return parent != null && parent.mkdirs(); }/*from w w w .ja v a2 s.c o m*/ public static boolean makeDirectory(String fileName) { File file = new File(fileName); return makeDirectory(file); } }