Here you can find the source of makeDirectories(final String location)
Parameter | Description |
---|---|
location | the location to make the directory. |
public static void makeDirectories(final String location)
//package com.java2s; //License from project: BSD License import java.io.File; public class Main { /**//from w w w . ja va2 s .c o m * Makes the directory for the given location if it doesn't exist. * * @param location the location to make the directory. */ public static void makeDirectories(final String location) { final File file = new File(location); makeDirectories(file); } /** * Makes the directory for the given location if it doesn't exist. * * @param location the location to make the directory. */ public static void makeDirectories(final File location) { final File parent = location.getParentFile(); if (parent != null) { parent.mkdirs(); } } }