Here you can find the source of checkDirAndCreate(File dir)
Parameter | Description |
---|---|
dir | directory to check/create |
public static void checkDirAndCreate(File dir)
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { /**/* w w w .j av a 2 s.c o m*/ * Checks a directory for existence and creates it if non-existent. * * @param dir * directory to check/create */ public static void checkDirAndCreate(File dir) { if (!dir.exists()) dir.mkdirs(); } }