Here you can find the source of makePath(File copyTo)
public static void makePath(File copyTo) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.IOException; public class Main { public static void makePath(File copyTo) throws IOException { File p = copyTo.getParentFile(); if (p == null) { return; }/*from w ww .j av a2s . c om*/ if (!p.exists()) { if (!p.mkdirs()) { throw new IOException("Could not create directory: " + p.getAbsolutePath()); } } } }