}
if (resource == null || !resource.isDirectory()) {
return null;
}
final Set<String> resources = new HashSet<String>();
for (Resource res : resource.list()) {
File file = res.getFile();
if (file != null) {
File base = res.getResourceManagerRoot();
String filePath = file.getAbsolutePath().substring(base.getAbsolutePath().length());
filePath = filePath.replace('\\', '/'); //for windows systems