Here you can find the source of mkdirs(String name)
Parameter | Description |
---|---|
String | The direct pathname |
public final static boolean mkdirs(String name)
//package com.java2s; /**//www. j a v a2 s .com * Copyright (C) 2013-2017 * Jeffrey Fulmer - <jeff@joedog.org>, et al. * * This program 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 2 of the License, or * (at your option) any later version. * * This program 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 this program; if not, write to the Free Software Foundation, Inc. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *-- */ import java.io.File; public class Main { /** * Creates the directory named by this abstract pathname, * including any necessary but nonexistent parent directories. * <p> * @param String The direct pathname * @return boolean Returns true if successful */ public final static boolean mkdirs(String name) { File file; if (name == null) { return false; } file = new File(name); return file.mkdirs(); } }