X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fde%2Ftodesbaum%2Fjsite%2Fgui%2FFileScanner.java;h=ede930d388288d72fd8bd445183b3a63ac8a1fe4;hb=a6bda7a82aa1b2cfd0313fb28d3dcca68ca516c5;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..ede930d 100644 --- a/src/de/todesbaum/jsite/gui/FileScanner.java +++ b/src/de/todesbaum/jsite/gui/FileScanner.java @@ -1,6 +1,5 @@ /* - * jSite - a tool for uploading websites into Freenet - * Copyright (C) 2006 David Roden + * jSite - FileScanner.java - Copyright © 2006–2011 David Roden * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,7 +31,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 +52,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 +62,7 @@ public class FileScanner implements Runnable { /** * Adds the given listener to the list of listeners. - * + * * @param fileScannerListener * The listener to add */ @@ -73,7 +72,7 @@ public class FileScanner implements Runnable { /** * Removes the given listener from the list of listeners. - * + * * @param fileScannerListener * The listener to remove */ @@ -95,7 +94,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 +111,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 +121,7 @@ public class FileScanner implements Runnable { /** * Returns the list of found files. - * + * * @return The list of found files */ public List getFiles() { @@ -131,7 +130,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 +141,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) {