New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[VFS-497] Ported filters from Commons IO #9
Conversation
@ecki @garydgregory Any opinion on this? |
I do not like it. Commons CVS is already a kitchen sink of sorts, so would just centralize all filters in Commons IO and make VFS depend on IO. |
Darn autocomplete! I meant VFS, not CSV. |
I checked this option before I decided to port the code to VFS. Unfortunately commons IO filter uses the Java type File all over the place. You would need to make an incompatible change to the commons io code or create a new package for it. So, I'd suggest just to merge the (three years old) code. |
It's a bit heavyweight and I had no need for those filters however I like the fact that the patch does not add a dependency, so it is fine with me. Will merge it. |
Great. Go ahead! |
Patch from Michael Schnell adapted to different folder names. Also clean ups like removing extra generics in object creation not needed since Java 7.
Merged with some changes. |
Add @SInCE 2.4 and convert IOCase from class to enum. Use try-with-resources.
Add CanExecuteFileFilter. Better test method name. Use try-with-resources. Longer formatted lines.
The method org.apache.commons.vfs2.FileFilter.accept(FileSelectInfo) now throws a FileSystemException. This change is binary compatible but is not source compatible.
https://issues.apache.org/jira/browse/VFS-497