private void addFile(File file, FolderNode to, boolean recurse,
boolean flatten) {
// if it's a file create the file and add it...
if (file.isFile()) {
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) {