Add “ignore hidden files” property to project.
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Fri, 1 Jan 2010 19:56:59 +0000 (20:56 +0100)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Fri, 1 Jan 2010 19:56:59 +0000 (20:56 +0100)
src/de/todesbaum/jsite/application/Project.java

index 3768d06..669b782 100644 (file)
@@ -60,6 +60,9 @@ public class Project implements Comparable<Project> {
        /** The edition to insert to. */
        protected int edition;
 
+       /** Whether to ignore hidden directory. */
+       private boolean ignoreHiddenFiles;
+
        /** Options for files. */
        protected Map<String, FileOption> fileOptions = new HashMap<String, FileOption>();
 
@@ -86,6 +89,7 @@ public class Project implements Comparable<Project> {
                localPath = project.localPath;
                indexFile = project.indexFile;
                lastInsertionTime = project.lastInsertionTime;
+               ignoreHiddenFiles = project.ignoreHiddenFiles;
                fileOptions = new HashMap<String, FileOption>(project.fileOptions);
        }
 
@@ -248,6 +252,27 @@ public class Project implements Comparable<Project> {
        }
 
        /**
+        * Returns whether hidden files are ignored, i.e. not inserted.
+        *
+        * @return {@code true} if hidden files are not inserted, {@code false}
+        *         otherwise
+        */
+       public boolean isIgnoreHiddenFiles() {
+               return ignoreHiddenFiles;
+       }
+
+       /**
+        * Sets whether hidden files are ignored, i.e. not inserted.
+        *
+        * @param ignoreHiddenFiles
+        *            {@code true} if hidden files are not inserted, {@code false}
+        *            otherwise
+        */
+       public void setIgnoreHiddenFiles(boolean ignoreHiddenFiles) {
+               this.ignoreHiddenFiles = ignoreHiddenFiles;
+       }
+
+       /**
         * {@inheritDoc}
         * <p>
         * This method returns the name of the project.