01: package vqwiki.utils;
02:
03: import java.io.File;
04: import java.io.FilenameFilter;
05:
06: /*
07: Very Quick Wiki - WikiWikiWeb clone
08: Copyright (C) 2001-2002 Gareth Cronin
09:
10: This program is free software; you can redistribute it and/or modify
11: it under the terms of the latest version of the GNU Lesser General
12: Public License as published by the Free Software Foundation;
13:
14: This program is distributed in the hope that it will be useful,
15: but WITHOUT ANY WARRANTY; without even the implied warranty of
16: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17: GNU Lesser General Public License for more details.
18:
19: You should have received a copy of the GNU Lesser General Public License
20: along with this program (gpl.txt); if not, write to the Free Software
21: Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22: */
23:
24: public class TextFileFilter implements FilenameFilter {
25:
26: /**
27: *
28: */
29: public TextFileFilter() {
30: }
31:
32: /**
33: *
34: */
35: public boolean accept(File file, String name) {
36: if (name.endsWith(".txt"))
37: return true;
38: return false;
39: }
40: }
|