Java mkdir makeDirectory(File file)

Here you can find the source of makeDirectory(File file)

Description

make Directory

License

Apache License

Declaration

public static boolean makeDirectory(File file) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.File;

public class Main {

    public static boolean makeDirectory(File file) {
        //File parent = file.getParentFile();
        //if (parent != null) 
        //{/*from   ww  w . j  a  v a  2  s .  c  o  m*/
        return file.mkdirs();
        //}
        //return false;
    }

    public static boolean makeDirectory(String fileName) {
        boolean bTmp = false;
        try {
            File file = new File(fileName.toString());
            makeDirectory(file);
            bTmp = true;
        } catch (Exception ex) {
            bTmp = false;
            System.out.println(ex.toString());
        }
        return bTmp;
    }
}

Related

  1. makeDirectories(String path)
  2. makeDirectories(String path)
  3. makeDirectory(File dir)
  4. makeDirectory(File directory)
  5. makeDirectory(File file)
  6. makeDirectory(File file)
  7. makedirectory(File outputDirectory, String directoryName)
  8. makeDirectory(File testDir )
  9. makeDirectory(final CharSequence aPath)