public static boolean isDirectory(String path){
  File f=new File(path);
  return f.isDirectory();
}

public static boolean isDirectory ( String path ) { File f = new File ( path ) ; return f . isDirectory ( ) ; }
checks if the given path is a directory
