summaryrefslogtreecommitdiffstats
path: root/conversion/FileSieve.java
blob: 8d6c64358367becfb15fcacbe9abfc5331ed4adb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package scruf.conversion;

import java.io.*;
import java.util.regex.*;

public class FileSieve implements FileFilter {
    // this method return true, if this file doesn't represent
    // a html file.
    public boolean accept(File pathname) {
	Pattern pattern = Pattern.compile("(.+\\.(html|png|jpg|css|tar|ttf))|(.+?\\~)|(index)|(\\..+)");
	Matcher matcher = pattern.matcher(pathname.getName());
	boolean bool = matcher.find();
	return !bool;
    }    
}