this.updateProgress(file);
to.addNode(new FileNode(file));
}
// else, if it's a directory then add all of it's directories...
if (file.isDirectory() && recurse) {
FolderNode addToFolder = to;
if (!flatten) {
addToFolder = new FolderNode(file.getName());
to.addNode(addToFolder);
}
File[] files = file.listFiles();
if (files != null) {
for (int i = 0; i < files.length && !stopping; i++) {