Java Create Directory mkdir(String folderpath)

Here you can find the source of mkdir(String folderpath)

Description

mkdir

License

Open Source License

Declaration

public static boolean mkdir(String folderpath) 

Method Source Code

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

import java.io.File;

public class Main {
    public static boolean mkdir(String folderpath) {
        boolean status = true;

        File file = new File(folderpath);

        if (file.exists()) {
            status = false;/*from   w  ww .  j  av a2  s  . co  m*/
        } else {
            file.mkdir();
            System.out.println("Mkdir: " + folderpath);
        }

        return status;
    }
}

Related

  1. mkdir(String dirname)
  2. mkdir(String dirPath, boolean del)
  3. mkdir(String dname)
  4. mkdir(String folder)
  5. mkdir(String folderName, long lastModifiedDate)
  6. mkDir(String fullPath, String directoryPath)
  7. mkdir(String mkdirName)
  8. mkdir(String name)
  9. mkdir(String name)