static void validateDirectoryParam()

in src/main/java/software/amazon/neptune/csv2rdf/Csv2Rdf.java [193:211]


	static void validateDirectoryParam(@NonNull File directory, @NonNull String param, boolean create) {

		if (directory.isDirectory()) {
			return;
		}

		if (directory.exists()) {
			throw new Csv2RdfException(
					"Parameter " + param + " does not point to a directory: " + directory.getAbsolutePath());
		}
		if (!create) {
			throw new Csv2RdfException(
					"Directory for parameter " + param + " does not exist: " + directory.getAbsolutePath());
		}
		if (!directory.mkdirs()) {
			throw new Csv2RdfException(
					"Directory for parameter " + param + " could not be created: " + directory.getAbsolutePath());
		}
	}