Java Directory Exist Check checkDirExist(String path)

Here you can find the source of checkDirExist(String path)

Description

check Dir Exist

License

Apache License

Declaration

public static Boolean checkDirExist(String path) 

Method Source Code

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

import java.io.File;

public class Main {
    public static Boolean checkDirExist(String path) {
        File file = new File(path);
        if (!file.exists()) {
            file.mkdirs();//from www  .java 2s.com
            System.out.println("Launcher.checkDirExist()#File doesn't exist, create new: " + path);
            return false;
        }

        return true;
    }
}

Related

  1. checkDir(String dir, boolean mustExist)
  2. checkDirectory(String name, boolean createIfNonExistent)
  3. checkDirectoryExists(String path)
  4. checkDirExistence(String dir)
  5. checkDirExistenceOrCreateMissingParts(final String dirPath)
  6. checkDirExists(File dir)
  7. checkDirExists(String dir)