Java Create Directory mkdirs(final String path)

Here you can find the source of mkdirs(final String path)

Description

Creates a directory and parent directories if needed.

License

LGPL

Parameter

Parameter Description
path the path of the directory to create

Return

true if the directory was created (possibly with parent directories) , false otherwise

Declaration

public static boolean mkdirs(final String path) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.io.File;

public class Main {
    /**/*from  w w  w.  ja v a2 s  .  c  om*/
     * Creates a directory and parent directories if needed.
     * 
     * @param path
     *            the path of the directory to create
     * @return true if the directory was created (possibly with parent
     *         directories) , false otherwise
     */
    public static boolean mkdirs(final String path) {
        return new File(path).mkdirs();
    }
}

Related

  1. mkdirs(final File aDirectory)
  2. mkdirs(final File dirs)
  3. mkdirs(final File f)
  4. mkdirs(final File file)
  5. mkdirs(final File outdir, final String path)
  6. mkdirs(final String path)
  7. mkdirs(String destDir)
  8. mkdirs(String destination)
  9. mkdirs(String dirName)