public static void copyResourceToFile(Resource resource, File file) {
		try (InputStream io = resource.getInputStream()) {
			copyToFile(io, file);
		} catch (IOException e) {
			log.error("error while writing {}", resource.getFilename(), e);
		}
	}
Copy the given resource to the given file.

@param resourcePath resource path
@param file         file to write
@since 3.2
ngrinder-controller/src/main/java/org/ngrinder/common/util/FileUtils.java