Java Is Directory Valid isValidDirectory(String filePath)

Here you can find the source of isValidDirectory(String filePath)

Description

is Valid Directory

License

Open Source License

Declaration

public static boolean isValidDirectory(String filePath) 

Method Source Code

//package com.java2s;
/**//from  www  .  j av  a2 s.c om
 *  
 * Copyright (c) 2015 Fannie Mae, All rights reserved.
 * This program and the accompany materials are made available under
 * the terms of the Fannie Mae Open Source Licensing Project available 
 * at https://github.com/FannieMaeOpenSource/ezPie/wiki/License
 * 
 * ezPIE? is a registered trademark of Fannie Mae
 * 
 */

import java.io.File;

public class Main {
    public static boolean isValidDirectory(String filePath) {
        if (filePath == null)
            return false;
        File f = new File(filePath);
        return f.exists() && f.isDirectory();
    }

    public static boolean exists(String filePath) {
        if (filePath == null)
            return false;
        File f = new File(filePath);
        return f.exists();
    }
}

Related

  1. isValidDir(String dirPath, boolean createDir)
  2. isValidDirectory(File directory)
  3. isValidDirectory(File directory)
  4. isValidDirectory(File f)
  5. isValidDirectory(final File folder)
  6. isValidDirectory(String name)
  7. isValidDirectory(String path)