Java Directory Create nio mkdir(final File dir)

Here you can find the source of mkdir(final File dir)

Description

mkdir

License

Open Source License

Declaration

public static File mkdir(final File dir) throws IOException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.File;

import java.io.IOException;

import java.nio.file.Files;

public class Main {
    public static File mkdir(final File dir) throws IOException {
        if (dir == null) {
            throw new NullPointerException("argument 'dir' is null");
        }//from w  w w.  ja v  a2s.  c  o m

        return Files.createDirectories(dir.toPath()).toFile();
    }
}

Related

  1. mkdir(final File dir)
  2. mkdirs(Path dir, FileAttribute... attrs)
  3. mkdirs(Path path)
  4. mkdirs(Path path)