Here you can find the source of createDirectoriesIfRequired(@Nonnull Path path)
public static void createDirectoriesIfRequired(@Nonnull Path path) throws IOException
//package com.java2s; //License from project: Open Source License import javax.annotation.Nonnull; import java.io.IOException; import java.nio.file.*; import static java.nio.file.Files.*; public class Main { public static void createDirectoriesIfRequired(@Nonnull Path path) throws IOException { if (!exists(path)) { createDirectories(path);/* ww w.j a v a2 s . co m*/ } } }