Java tutorial
//package com.java2s; import java.io.*; public class Main { public static String obtainDirS(String path) { return obtainDirF(path).getAbsolutePath(); } public static File obtainDirF(String path) { File file = new File(path); if (!file.exists()) { file.mkdirs(); } return file; } }