}
public static Resource newResource(String instance, String base) throws IOException, URISyntaxException {
URL instanceURL = pathToUrl(instance);
URL baseURL = pathToUrl(base);
Resource instanceFileResource = new FileResource(instanceURL);
if (baseURL.equals(instanceURL))
return new FileResource(instanceURL);
Resource baseFileResource = new FileResource(pathToUrl(base));
return new InheritingFileResource(instanceFileResource, baseFileResource);
}