if (cacheFile.isDirectory()) {
// DirectoryResourceLocation will only return "file" URLs within this directory
// do not user the DirectoryResourceLocation for non file based urls
resourceLocation = new DirectoryResourceLocation(cacheFile);
} else {
resourceLocation = new JarResourceLocation(codeSource, cacheFile);
}
return resourceLocation;
}