Java mkdir makeDirectory(String newDirString)

Here you can find the source of makeDirectory(String newDirString)

Description

make Directory

License

Open Source License

Declaration

public static void makeDirectory(String newDirString) 

Method Source Code


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

import java.io.File;

public class Main {
    public static void makeDirectory(String newDirString) {
        File file = new File(newDirString);
        if (!file.exists()) {
            if (file.mkdir()) {
                System.out.println("\ninfo: Directory was created!\n");
            } else {
                System.out.println("\nerror: Failed to create directory!\n");
            }/*w  ww. ja  v  a2 s  .com*/
        }
    }
}

Related

  1. makeDirectory(String directoryName)
  2. makeDirectory(String directoryPath)
  3. makeDirectory(String dirPath)
  4. MakeDirectory(String name)
  5. makeDirectory(String name)
  6. makeDirectory(String outputDirectory, String directoryName)
  7. makeDirectory(String path)
  8. makeDirectory(String path, String directoryName)
  9. makeDirectory(String sDir)