List of usage examples for org.springframework.core.io WritableResource exists
boolean exists();
From source file:org.mitre.mpf.wfm.util.PropertiesUtil.java
private static WritableResource getDataResource(WritableResource dataResource, InputStreamSource templateResource) { if (dataResource.exists()) { return dataResource; }/*from www . ja v a 2 s .c om*/ try { log.info("{} doesn't exist. Copying from {}", dataResource, templateResource); copyResource(dataResource, templateResource); return dataResource; } catch (IOException e) { throw new UncheckedIOException(e); } }