Here you can find the source of getOrCreateDir(Path path)
private static File getOrCreateDir(Path path)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.nio.file.Path; public class Main { private static File getOrCreateDir(Path path) { if (path == null) { return null; }// ww w .java 2 s . c om File file = path.toFile(); if (!file.exists()) { file.mkdirs(); } return file; } }