Here you can find the source of MakeDirectory(String name)
public static void MakeDirectory(String name)
//package com.java2s; /**//from ww w . java 2 s . com * rscplus * * This file is part of rscplus. * * rscplus is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * rscplus is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with rscplus. If not, see <http://www.gnu.org/licenses/>. * * Authors: see <https://github.com/OrN/rscplus> */ import java.io.File; public class Main { public static void MakeDirectory(String name) { File dir = new File(name); if (dir.isFile()) dir.delete(); if (!dir.exists()) dir.mkdir(); } }