code: public static File noDirectory(File file) {
  		Validate.exists(file);
  		if(file.isDirectory())
  			throw new ParameterException("\""+file+"\" is a directory!");
  		return file;
  	}
docs: Checks if the given file exists and is not a directory.
  @param file The file to validate.
  @return The validated file reference.
  @throws ParameterException if the file exists or is a directory.