Java Create Directory mkdirs(final String path)

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

Description

mkdirs

License

Open Source License

Declaration

public static File mkdirs(final String path) 

Method Source Code


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

import java.io.*;

public class Main {
    public static File mkdirs(final String path) {
        final File file = new File(path);
        if (!file.exists()) {
            final File dir = new File(file.getParent());
            if (!dir.exists()) {
                dir.mkdirs();/*ww  w.j a  va2 s.co  m*/
            }
        }
        return file;
    }
}

Related

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