Java mkdir makeDirectory(String sDir)

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

Description

make Directory

License

Open Source License

Declaration

public static final void makeDirectory(String sDir) 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 final void makeDirectory(String sDir) throws IOException {
        File fDir = new File(sDir);
        if (!fDir.exists())
            fDir.mkdirs();/*from  www.  j a va2  s. c o m*/
        if (fDir.isFile()) {
            throw new java.io.IOException("The file with the same name already exists. - " + sDir);
        }
    }
}

Related

  1. makeDirectory(String name)
  2. makeDirectory(String newDirString)
  3. makeDirectory(String outputDirectory, String directoryName)
  4. makeDirectory(String path)
  5. makeDirectory(String path, String directoryName)
  6. makeDirectoryWorldAccessible(File directory)
  7. makeDirForPath(String path)
  8. makeDirIfNotExists(File... paths)
  9. makeDirRecursive(File f)