I need to rewrite some java 7 file IO code that should run on a Java 6 VM too.
The implementation uses handy Java 7 features like autoclosing, Paths
and Files
.
To be more specific, I need to handle expressions like /tmp/foo/*.bar
to return all .bar files (currently implemented with Files.newDirectoryStream(dir, glob)
).
Does anyone know a handy library for this?
The Apache Ant API would be a good candidate for this, in particular their FileSet class might do the job.