Java Is Directory Valid isValidDirectory(File f)

Here you can find the source of isValidDirectory(File f)

Description

Indicates if the given file is a valid directory.

License

LGPL

Parameter

Parameter Description
f file to test

Return

true if the given file is a valid directory.

Declaration

private static boolean isValidDirectory(File f) 

Method Source Code


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

import java.io.File;

public class Main {
    /**//w  ww .  j  a v a  2s  . com
     * Indicates if the given file is a valid directory.
     * @param f file to test
     * @return true if the given file is a valid directory.
     */
    private static boolean isValidDirectory(File f) {
        return f.exists() && f.isDirectory() && f.canRead();
    }
}

Related

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