Java Directory Create mkdirs(File dir)

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

Description

Mkdirs.

License

Open Source License

Parameter

Parameter Description
dir the dir

Return

true, if successful

Declaration

public static boolean mkdirs(File dir) 

Method Source Code


//package com.java2s;
import java.io.File;

public class Main {
    /** The Constant mkdirsMutex. */
    private static final Object mkdirsMutex = new Object();
    /** The mkdirs thread. */
    private static volatile Thread mkdirsThread;
    /** The mkdirs start time. */
    private static volatile long mkdirsStartTime;

    /**/*from w w  w  . j  a  va2s.co  m*/
     * Mkdirs.
     *
     * @param dir the dir
     * @return true, if successful
     */
    public static boolean mkdirs(File dir) {
        synchronized (mkdirsMutex) {
            try {
                mkdirsThread = Thread.currentThread();
                mkdirsStartTime = System.currentTimeMillis();
                return dir.mkdirs();
            } finally {
                mkdirsThread = null;
            }
        }
    }
}

Related

  1. mkdirs(File dir)
  2. mkdirs(File dir)
  3. mkdirs(File dir)
  4. mkdirs(File dir)
  5. mkdirs(File dir)
  6. mkdirs(File dir)
  7. mkdirs(File dir)
  8. mkdirs(File dir)
  9. mkdirs(File dir)