Java Path Create nio createDirectoriesIfRequired(@Nonnull Path path)

Here you can find the source of createDirectoriesIfRequired(@Nonnull Path path)

Description

create Directories If Required

License

Open Source License

Declaration

public static void createDirectoriesIfRequired(@Nonnull Path path) throws IOException 

Method Source Code

//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*/
        }
    }
}

Related

  1. createAndGetOutputStream(String typename, String outputPath)
  2. createBufferedReader(Path path)
  3. createChecksums(final Path file, final Map functions)
  4. createClassWithDepsNextExtra(int index, Path dir)
  5. createDir(Path p)
  6. createDirectory(final Path parent, final String folderName)
  7. createDirectory(Path parent, String name)
  8. createDirectory(Path path)
  9. createDirIfDoesNotExist(String websitesDirPath)