diff options
author | rsiddharth <rsiddharth@ninthfloor.org> | 2012-06-23 22:44:40 +0530 |
---|---|---|
committer | rsiddharth <rsiddharth@ninthfloor.org> | 2012-06-23 22:44:40 +0530 |
commit | 8bcd7f58acd38f5d5e1731f89be4a10a79d0fdb7 (patch) | |
tree | 6c1d4dfc97d77230ecf95d4e0f8b4fe1cde5b739 /conversion/FileSieve.java |
scruf is "bzr"ed now.
Diffstat (limited to 'conversion/FileSieve.java')
-rw-r--r-- | conversion/FileSieve.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/conversion/FileSieve.java b/conversion/FileSieve.java new file mode 100644 index 0000000..e0a5166 --- /dev/null +++ b/conversion/FileSieve.java @@ -0,0 +1,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))|(.+?\\~)|(index)"); + Matcher matcher = pattern.matcher(pathname.getName()); + boolean bool = matcher.find(); + return !bool; + } +}
\ No newline at end of file |