Java mkdir MakeDir(String dirName)

Here you can find the source of MakeDir(String dirName)

Description

Make Dir

License

Open Source License

Declaration

public static void MakeDir(String dirName) throws IOException 

Method Source Code


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

import java.io.File;

import java.io.IOException;

public class Main {
    public static void MakeDir(String dirName) throws IOException {
        File dir = new File(dirName);
        if (!dir.exists()) {
            //System.out.println("Creating directory: " + dirName);
            boolean result = dir.mkdirs();
            if (!result) {
                System.out.println("Directory cannot be created: " + dirName);
            }//from w w  w.  j a v a 2  s  . co  m
        }
    }
}

Related

  1. makedir(String containerDir, String name)
  2. makeDir(String dir)
  3. makeDir(String dir)
  4. makeDir(String dir)
  5. makeDir(String dir)
  6. MakeDir(String dirpath)
  7. makeDir(String dirPath)
  8. makeDir(String newDirName)
  9. makeDir(String parent, String child)