public List<Category> getCategories() throws IOException {
List<Category> categories = new ArrayList<Category>();
for (File subDirectory : directory.listFiles(new DirectoryFileFilter())) {
String name = decodeUri(subDirectory.getName());
if (isPotentialValidLink(subDirectory)) {
WindowsShortcut shortcut = new WindowsShortcut(subDirectory);
if (shortcut.isDirectory()) {
name = removeExtension(name);
subDirectory = new File(shortcut.getRealFilename());
} else
continue;
}
categories.add(new LocalCategory(catalog, subDirectory, name));
}