package org.jbake.app;

import java.io.File;
import java.io.FileFilter;

/**
 * Provides File related functions
 * 
 * @author Jonathan Bullock <jonbullock@gmail.com>
 *
 */
public class FileUtil {
	
	/**
	 * Filters files based on their file extension.
	 * 
	 * @return	Object for filtering files
	 */
	public static FileFilter getFileFilter() {
		return new FileFilter() {
			
			@Override
			public boolean accept(File pathname) {
				if (pathname.isFile()) {
					if (pathname.getPath().endsWith(".html")) {
						return true;
					} else if (pathname.getPath().endsWith(".md")) {
						return true;
					} else {
						return false;
					}
				} else {
					return true;
				}
			}
		};
	}
}

@@ -427,28 +427,32 @@
 name) %7B%0A%09%09%09%09
-if (
+return !
 pathname.isF
@@ -460,21 +460,18 @@
 le()
-) %7B
 %0A%09%09%09%09%09
-if (
+%09%7C%7C 
 path
@@ -506,47 +506,18 @@
 ml%22)
-) %7B
 %0A%09%09%09%09%09%09
-return true;%0A%09%09%09%09%09%7D else if (
+%7C%7C 
 path
@@ -550,108 +550,9 @@
 md%22)
-) %7B%0A%09%09%09%09%09%09return true;%0A%09%09%09%09%09%7D else %7B%0A%09%09%09%09%09%09return false;%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D else %7B%0A%09%09%09%09%09return true;%0A%09%09%09%09%7D
+;
 %0A%09%09%09

simplify complex condition