StringBuffer rslt = new StringBuffer();
ResourceCollection resources = isPreserveDuplicates() ? (ResourceCollection) path : new Union(path);
List ret = new ArrayList();
FileNameMapper mapperImpl = mapper == null ? new IdentityMapper() : mapper.getImplementation();
for (Resource r : resources) {
String[] mapped = mapperImpl.mapFileName(String.valueOf(r));
for (int m = 0; mapped != null && m < mapped.length; ++m) {
ret.add(mapped[m]);
}