Here you can find the source of makeDirectories(String path)
Parameter | Description |
---|---|
path | The path to create |
Parameter | Description |
---|---|
IOException | If the path could not be created or the path is a file |
public static void makeDirectories(String path) throws IOException
//package com.java2s; //License from project: Apache License import java.io.File; import java.io.IOException; public class Main { /**/*from w w w. j a va 2s . com*/ * Create a directory structure * @param path The path to create * @throws IOException If the path could not be created or the path is a file */ public static void makeDirectories(String path) throws IOException { // File target = new File(path); if (target.exists()) { if (!target.isDirectory()) { throw new IOException( "Target directory for generating CreativeWorks files is actually a file"); } } else { target.mkdirs(); } } }