public abstract void createDirectory (Path dir, FileAttribute<?>… attrs) throws IOException

Creates a new directory. This method works in exactly the manner specified by the Files.createDirectory method.

dir     the directory to create
attrs     an optional list of file attributes to set atomically when creating the directory

UnsupportedOperationException     if the array contains an attribute that cannot be set atomically when creating the directory
FileAlreadyExistsException     if a directory could not otherwise be created because a file of that name already exists (optional specific exception)
IOException     if an I/O error occurs or the parent directory does not exist
SecurityException     In the case of the default provider, and a security manager is installed, the checkWrite method is invoked to check write access to the new directory.