3

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?

3 Answers 3

1

The Apache Commons IO API is also a good choice. I used it for a similar work (rewrite some code from java7 to java6 that used Path object) and they work very well.

Sign up to request clarification or add additional context in comments.

Comments

0

The Apache Ant API would be a good candidate for this, in particular their FileSet class might do the job.

Comments

0

guava runs on java6 and it has a nice I/O api.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.