Here you can find the source of mkdir(File parentDir, String name)
Parameter | Description |
---|---|
parentDir | a parameter |
name | a parameter |
Parameter | Description |
---|---|
IOException | an exception |
public static File mkdir(File parentDir, String name) throws IOException
//package com.java2s; /******************************************************************************* * Manchester Centre for Integrative Systems Biology * University of Manchester/*from w w w . j a v a 2 s . c o m*/ * Manchester M1 7ND * United Kingdom * * Copyright (C) 2007 University of Manchester * * This program is released under the Academic Free License ("AFL") v3.0. * (http://www.opensource.org/licenses/academic.php) *******************************************************************************/ import java.io.*; public class Main { /** * * @param parentDir * @param name * @return File * @throws IOException */ public static File mkdir(File parentDir, String name) throws IOException { final File directory = new File(parentDir, name); if (!directory.mkdir()) { throw new IOException(); } return directory; } }