Here you can find the source of createDirectory(Path path)
public static void createDirectory(Path path) throws IOException
//package com.java2s; //License from project: Apache License import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; public class Main { public static void createDirectory(Path path) throws IOException { if (Files.notExists(path)) { Files.createDirectory(path); }/*from w ww . j a v a2 s . c o m*/ } }