On Mon, Jun 19, 2023 at 8:17 PM Gary Gregory <garydgreg...@gmail.com> wrote: > > I like the general idea of adding configurable include and exclude features. > > I am uncertain about baking in the Ant-specific pattern formats in > Commons IO. Allowing the include and exclude feature to be provided > through some interfaces and/or lambdas would be fine, which would then > enable Ant to pass its pattern syntax processor. >
That seems like indirections on top of indirections. PathFilter and FileFilter already offer sufficient indirection here. Adding more interfaces or lambdas on top of the existing interfaces feels excessive. On further investigation, org.apache.commons.io.filefilter.WildcardFileFilter already covers most of what this needs. That is, it handles ? and * globs in paths. The piece it's missing is a double asterisk ** to select everything below a directory. According to ant docs, "To make things a bit more flexible, we add one extra feature, which makes it possible to match multiple directory levels. This can be used to match a complete directory tree, or a file anywhere in the directory tree. To do this, ** must be used as the name of a directory. When ** is used as the name of a directory in the pattern, it matches zero or more directories. For example: /test/** matches all files/directories under /test/, such as /test/x.java, or /test/foo/bar/xyz.html, but not /xyz.xml." -- Elliotte Rusty Harold elh...@ibiblio.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org