public static boolean exists(String path){
  if (path == null)   return false;
  Path p=Paths.get(path);
  return Files.exists(p) && Files.isDirectory(p) && Files.isReadable(p);
}

public static boolean exists ( String path ) { if ( path == null ) return false ; Path p = Paths . get ( path ) ; return Files . exists ( p ) && Files . isDirectory ( p ) && Files . isReadable ( p ) ; }
answers if the given path denotes existing directory .
