From: Marko v. D. <Mar...@cs...> - 2002-09-02 18:33:06
|
After throwing over the design a few times, I got a pretty nice implementation of FileSet. I changed Predicate into an interface while doing so, I needed multiple interface inheritance since it was impractical for LocalDisk and PatternPredicate to have a common superclass. I still needs to add some docs and specs though. The principle is as follows. a) you make a FileSet object b) you add FileSetPredicates to it using include() and exclude() A FileSetPredicate is a special predicate needed to make the process efficient. They can contain any ordinary predicate (they are predicate themselves), for example to check whether a file contains some word,.... c) you invoke getFiles() to get all the files in the FileSet It is now in package org.jutil.java.io, but it has to move to org.jutil.io.fileset. Moving it to org.jutil.io will most likely turn io into the same mess that collections had become, and I want to avoid that. Marko No. 5 -- Jutil.org - Programming as you know it is over http://org-jutil.sourceforge.net |