Here you can find the source of checkDirs(File f)
Parameter | Description |
---|---|
f | The file to be checked. |
public static void checkDirs(File f)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { /**/* w ww . jav a 2 s. c o m*/ * Make parent directories of the given file if no existing. * * @param f * The file to be checked. */ public static void checkDirs(File f) { if (!f.getParentFile().exists()) { f.getParentFile().mkdirs(); } } }