Here you can find the source of mkdirs(File dir)
Parameter | Description |
---|---|
dir | the dir |
public static boolean mkdirs(File dir)
//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; } } } }