Java mkdir MakeDirectory(String name)

Here you can find the source of MakeDirectory(String name)

Description

Make Directory

License

Open Source License

Declaration

public static void MakeDirectory(String name) 

Method Source Code

//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();
    }
}

Related

  1. makeDirectory(String directory)
  2. makeDirectory(String directoryName)
  3. makeDirectory(String directoryPath)
  4. makeDirectory(String dirPath)
  5. makeDirectory(String name)
  6. makeDirectory(String newDirString)
  7. makeDirectory(String outputDirectory, String directoryName)
  8. makeDirectory(String path)
  9. makeDirectory(String path, String directoryName)