use of org.bndtools.templating.FileResource in project bndtools by bndtools.
the class GitCloneTemplate method recurse.
private static void recurse(String prefix, File file, FileFilter filter, ResourceMap resourceMap) {
if (file.isDirectory()) {
String path = prefix + file.getName() + "/";
resourceMap.put(path, new FolderResource());
File[] children = file.listFiles(filter);
for (File child : children) {
recurse(path, child, filter, resourceMap);
}
} else {
String path = prefix + file.getName();
// TODO: WTF is the encoding?
resourceMap.put(path, new FileResource(file, "UTF-8"));
}
}
Aggregations