File test;\r
\r
if (type == DIR || type == BOTH) {\r
- fda.toDo(path);\r
+ if (fda.dirFilter(path)) {\r
+ fda.run(path);\r
+ }\r
}\r
for (int i = 0 ; i < list.length ; i++) {\r
test = new File(path + File.separator + list[i]);\r
toDoAll(path + File.separator + list[i], fda, type);\r
} else {\r
if (type == FILE || type == BOTH) {\r
- fda.toDo(path + File.separator + list[i]);\r
+ if (fda.fileFilter(path + File.separator + list[i])) {\r
+ fda.run(path + File.separator + list[i]);\r
+ }\r
}\r
}\r
}\r
}\r
\r
public static interface ForDoAll {\r
- public void toDo(String filepath) throws Exception;\r
+ public void run(String filepath) throws Exception;\r
+ \r
+ public boolean dirFilter(String filepath);\r
+ \r
+ public boolean fileFilter(String filepath);\r
}\r
}\r