Here you can find the source of makeDirectory(String directoryName)
Parameter | Description |
---|---|
directoryName | the name of the directory |
public static void makeDirectory(String directoryName)
//package com.java2s; /*/*from w w w. j a va2 s .c om*/ * Copyright (c) 2013, Miguel Martins * Use is subject to license terms. * * This source code file is provided under the MIT License. Full licensing * terms should be available in the form of text files. The standard source code * distribution provides a LICENSE.txt file which can be consulted for licensing * details. */ import java.io.File; public class Main { /** * Creates a directory given a directory name. If the corresponding * directory already exists, nothing happens. * * @param directoryName the name of the directory * @see File#mkdir() */ public static void makeDirectory(String directoryName) { File directory = new File(directoryName); if (!directory.exists()) { boolean directoryCreated = directory.mkdir(); assert directoryCreated : "Could not create output directory!"; } } }