Java tutorial
//package com.java2s; import java.io.File; public class Main { public static boolean createParentDir(File file) { boolean isMkdirs = true; if (!file.exists()) { File dir = file.getParentFile(); if (!dir.exists()) { isMkdirs = dir.mkdirs(); } } return isMkdirs; } }