Java Directory Create mkdir(File file)

Here you can find the source of mkdir(File file)

Description

mkdir

License

Apache License

Declaration

public static void mkdir(File file) 

Method Source Code


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

import java.io.File;

public class Main {
    public static void mkdir(String dir) {
        File file = new File(dir);
        mkdir(file);// ww  w.j av  a2 s  .co  m
    }

    public static void mkdir(File file) {
        if (file.exists()) {
            return;
        }
        File pFile = file.getParentFile();
        if (pFile != null) {
            mkdir(pFile);
        }
        //
        file.mkdir();
    }
}

Related

  1. mkdir(File dirFile)
  2. mkdir(File f)
  3. mkdir(File f)
  4. mkDir(File file)
  5. mkdir(File file)
  6. mkdir(File parent, String... segments)
  7. mkdir(File parentDir, String name)
  8. mkdirs(File dir)
  9. mkdirs(File dir)