Java Directory Create mkdirs(File dirs)

Here you can find the source of mkdirs(File dirs)

Description

CreatingUtils all folders at once.

License

Open Source License

Declaration

public static void mkdirs(File dirs) 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 {
    /**/*from w  ww . ja  va 2s  .c o m*/
     * CreatingUtils all folders at once.
     */
    public static void mkdirs(File dirs) throws IOException {
        if (dirs.exists()) {
            if (dirs.isDirectory() == false) {
                throw new IOException("Directory '"
                        + "' is not a directory.");
            }
            return;
        }
        if (dirs.mkdirs() == false) {
            throw new IOException("Unable to create directory '" + dirs
                    + "'.");
        }
    }

    /**
     * CreatingUtils all folders at once.
     */
    public static void mkdirs(String dirs) throws IOException {
        mkdirs(new File(dirs));
    }
}

Related

  1. mkdirs(File dir)
  2. mkdirs(File directory)
  3. mkdirs(File directory)
  4. mkdirs(File directory)
  5. mkdirs(File directory, String string)
  6. mkdirs(File dumpFile)
  7. mkdirs(File f)
  8. mkDirs(File f)
  9. mkdirs(File f)