yegor256
yegor256

Reputation: 105053

where to get a smart FileFilter?

I'm trying to find an implementation of java.io.FileFilter which understands patterns like these: "**/*.xml", "src/**/*.java", etc. Do you know any package that can provide such a filter (commons-io doesn't do this, or I can't understand how).

Upvotes: 2

Views: 129

Answers (3)

DerMike
DerMike

Reputation: 16190

I don't think FileFilter does help you here. It is used for evaluating files in one directory when passed to listFiles(...). You seem to want to search through sub directories.

Upvotes: 0

Clint
Clint

Reputation: 9058

You might want to check out DirectoryScanner from the Ant project. It does not implement FileFilter but it does recognize those types of patterns.

Upvotes: 1

Jayan
Jayan

Reputation: 18459

This notation is used in ant. So your best bet will be ant.jar

Upvotes: 0

Related Questions