Here you can find the source of makeDir(String parent, String child)
Parameter | Description |
---|---|
parent | directory |
child | directory |
public static synchronized void makeDir(String parent, String child)
//package com.java2s; import java.io.*; public class Main { public static String fileseperator = System.getProperty("file.separator"); /**/*from w w w . j av a 2 s . c o m*/ * @param path */ public static synchronized void makeDir(String path) { File dir = new File(path); if (!dir.exists()) { dir.mkdirs(); } } /** * create directory method * * @param parent directory * @param child directory */ public static synchronized void makeDir(String parent, String child) { StringBuffer mkdir = new StringBuffer(parent); mkdir.append(fileseperator); mkdir.append(child); makeDir(mkdir.toString()); } }