X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fde%2Ftodesbaum%2Fjsite%2Fgui%2FFileScanner.java;h=8ef13407d457a830859476a37fc9e2e5e1d6c448;hb=426678db1c59ce7bd69b66eebfe62aa34e8511df;hp=b699ebb4ec8eae088f5219f54e30abbb58f1288a;hpb=5c29aa2ec7fb5d4e362636d0e25c422668702f26;p=jSite.git diff --git a/src/de/todesbaum/jsite/gui/FileScanner.java b/src/de/todesbaum/jsite/gui/FileScanner.java index b699ebb..8ef1340 100644 --- a/src/de/todesbaum/jsite/gui/FileScanner.java +++ b/src/de/todesbaum/jsite/gui/FileScanner.java @@ -32,7 +32,7 @@ import de.todesbaum.jsite.i18n.I18n; /** * Scans the local path of a project anychronously and returns the list of found * files as an event. - * + * * @see Project#getLocalPath() * @see FileScannerListener#fileScannerFinished(FileScanner) * @author David ‘Bombe’ Roden <bombe@freenetproject.org> @@ -53,7 +53,7 @@ public class FileScanner implements Runnable { /** * Creates a new file scanner for the given project. - * + * * @param project * The project whose files to scan */ @@ -63,7 +63,7 @@ public class FileScanner implements Runnable { /** * Adds the given listener to the list of listeners. - * + * * @param fileScannerListener * The listener to add */ @@ -73,7 +73,7 @@ public class FileScanner implements Runnable { /** * Removes the given listener from the list of listeners. - * + * * @param fileScannerListener * The listener to remove */ @@ -95,7 +95,7 @@ public class FileScanner implements Runnable { *

* Scans all available files in the project’s local path and emits an event * when finished. - * + * * @see FileScannerListener#fileScannerFinished(FileScanner) */ public void run() { @@ -112,7 +112,7 @@ public class FileScanner implements Runnable { /** * Returns whether there was an error scanning for files. - * + * * @return true if there was an error, false * otherwise */ @@ -122,7 +122,7 @@ public class FileScanner implements Runnable { /** * Returns the list of found files. - * + * * @return The list of found files */ public List getFiles() { @@ -131,7 +131,7 @@ public class FileScanner implements Runnable { /** * Recursively scans a directory and adds all found files to the given list. - * + * * @param rootDir * The directory to scan * @param fileList @@ -142,8 +142,9 @@ public class FileScanner implements Runnable { private void scanFiles(File rootDir, List fileList) throws IOException { File[] files = rootDir.listFiles(new FileFilter() { + @SuppressWarnings("synthetic-access") public boolean accept(File file) { - return !file.isHidden(); + return !project.isIgnoreHiddenFiles() || !file.isHidden(); } }); if (files == null) {