Java tutorial
//package com.java2s; import java.io.*; public class Main { public static int createDir(String path) { int len = path.length(); if (len < 1) return -1; if (path.charAt(len - 1) != '/') path += "/"; if (new File(path).mkdir()) return 0; return -1; } }