private void checkDirectory ( File d , String dtype ) { if ( ! d . isAbsolute ( ) ) { throw new IllegalArgumentException ( dtype + " directory must be an absolute path (" + d . getPath ( ) + ")" ) ; } if ( ! d . exists ( ) ) { throw new IllegalArgumentException ( dtype + " directory does not exist (" + d . getPath ( ) + ")" ) ; } if ( ! d . isDirectory ( ) ) { throw new IllegalArgumentException ( dtype + " directory value is not a directory (" + d . getPath ( ) + ")" ) ; } }
A private utility function to verify that the directory is really a directory exists and absolute .