Here you can find the source of checkDirectory(File directory)
private static void checkDirectory(File directory)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { private static void checkDirectory(File directory) { if (!directory.isDirectory()) { throw new IllegalArgumentException(directory.getAbsolutePath() + " is not a directory"); }/*w w w . j a v a 2 s. co m*/ } }