Here you can find the source of makehome(String home)
Parameter | Description |
---|---|
home | a parameter |
Parameter | Description |
---|---|
Exception | an exception |
public static void makehome(String home) throws Exception
//package com.java2s; import java.io.*; public class Main { /**//from w w w . j a v a2 s . co m * create a directory * @param home * @throws Exception */ public static void makehome(String home) throws Exception { File homedir = new File(home); if (!homedir.exists()) { try { homedir.mkdirs(); } catch (Exception ex) { throw new Exception("Can not mkdir :" + home + " Maybe include special charactor!"); } } } }