Here you can find the source of checkDirectory(File target)
private static void checkDirectory(File target) throws IllegalArgumentException
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { private static void checkDirectory(File target) throws IllegalArgumentException { if (target == null) { throw new IllegalArgumentException("argument must not be null."); }/* w w w . j a v a 2s . c o m*/ if (target.isFile()) { throw new IllegalArgumentException("argument must be directory. [" + target.getAbsolutePath() + "]"); } } }