Here you can find the source of createDir(String path)
Parameter | Description |
---|---|
path | Directory to create |
public static void createDir(String path)
//License from project: Open Source License import java.io.BufferedWriter; import java.io.File; import java.io.FileFilter; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.FilenameFilter; import java.io.IOException; import java.io.PrintWriter; import java.nio.channels.FileChannel; import java.util.ArrayList; import com.haxademic.core.app.P; import com.haxademic.core.debug.DebugUtil; import com.haxademic.core.math.MathUtil; public class Main{ /**//from www.j a v a2 s. c om * Creates a new directory on the machine's filesystem * @param path Directory to create */ public static void createDir(String path) { File f = new File(path); try { if (f.mkdir()) { P.println("Directory created: " + path); } else { P.println("Directory was not created" + path); } } catch (Exception e) { e.printStackTrace(); } } }