Java Create Directory mkdir(String dname)

Here you can find the source of mkdir(String dname)

Description

mkdir

License

Open Source License

Declaration

public static File mkdir(String dname) 

Method Source Code

//package com.java2s;
/*-/*from   w w  w  . ja  v  a 2 s  .  co m*/
 * See the file LICENSE for redistribution information.
 * 
 * Copyright (c) 2010, 2011 Oracle and/or its affiliates.  All rights reserved.
 *
 */

import java.io.File;

public class Main {
    public static File mkdir(String dname) {
        File d = new File("TESTDIR");
        d.mkdir();
        File f = new File(d, dname);
        rm_rf(f);
        f.mkdir();
        return f;
    }

    public static void rm_rf(File f) {
        if (f.isDirectory())
            for (File f2 : f.listFiles())
                rm_rf(f2);
        f.delete();
    }
}

Related

  1. mkdir(String directory)
  2. mkDir(String DirectoryName)
  3. mkdir(String directoryName)
  4. mkdir(String dirname)
  5. mkdir(String dirPath, boolean del)
  6. mkdir(String folder)
  7. mkdir(String folderName, long lastModifiedDate)
  8. mkdir(String folderpath)
  9. mkDir(String fullPath, String directoryPath)