if (!directory.isDirectory()) {
throw new IllegalArgumentException("The given 'directory' MUST be a directory.");
}
currentDirectory = directory;
localFiles.clear();
for (File file : new FileGatherer(directory)) {
localFiles.add(file);
}
System.out.println("Directory changed");
rebuildNewNamesCache();
}