Java Utililty Methods File Create If not Exist

List of utility methods to do File Create If not Exist

Description

The list of methods to do File Create If not Exist are organized into topic(s).

Method

voidensureExists(File dir)
ensure Exists
if (!dir.exists()) {
    dir.mkdirs();
voidensureExists(File file)
throws RuntimeException if file does not exist
if (!file.exists()) {
    throw new RuntimeException("File '" + file.getAbsolutePath() + "' does not exist.");