You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Michael (JIRA)" <ji...@apache.org> on 2007/12/27 22:38:43 UTC
[jira] Created: (IO-151) Provide other Filter implementation
Provide other Filter implementation
-----------------------------------
Key: IO-151
URL: https://issues.apache.org/jira/browse/IO-151
Project: Commons IO
Issue Type: Improvement
Components: Filters
Reporter: Michael
Right now all Filters implement IOFileFilter which extends FileFilter and FilenameFilter. Well, this is nice but only usable with java.io.File#list method. The return type is a string array with the filenames.
This array is useless to me and others since we need a file object array to do some operations with the file reference.
applying any filter to File#listFiles(...) result in "unambigious method call" since IOFileFiter extends both java interfaces and java does not know which to resolve.
So am asking to split implemetation or make is usable with listFiles methods somehow.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (IO-151) Provide other Filter implementation
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554672 ]
Niall Pemberton commented on IO-151:
------------------------------------
You can easily use the implementations with listFiles() - just cast to the appropriate type
File[] dirs = file.listFiles((FileFilter)DirectoryFileFilter.DIRECTORY);
> Provide other Filter implementation
> -----------------------------------
>
> Key: IO-151
> URL: https://issues.apache.org/jira/browse/IO-151
> Project: Commons IO
> Issue Type: Improvement
> Components: Filters
> Reporter: Michael
>
> Right now all Filters implement IOFileFilter which extends FileFilter and FilenameFilter. Well, this is nice but only usable with java.io.File#list method. The return type is a string array with the filenames.
> This array is useless to me and others since we need a file object array to do some operations with the file reference.
> applying any filter to File#listFiles(...) result in "unambigious method call" since IOFileFiter extends both java interfaces and java does not know which to resolve.
> So am asking to split implemetation or make is usable with listFiles methods somehow.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (IO-151) Provide other Filter implementation
Posted by "Michael (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael closed IO-151.
----------------------
Resolution: Invalid
Niall,
you made my day! This is exactly what I was looking for. I didn't expect this to work :-D
thx
> Provide other Filter implementation
> -----------------------------------
>
> Key: IO-151
> URL: https://issues.apache.org/jira/browse/IO-151
> Project: Commons IO
> Issue Type: Improvement
> Components: Filters
> Reporter: Michael
>
> Right now all Filters implement IOFileFilter which extends FileFilter and FilenameFilter. Well, this is nice but only usable with java.io.File#list method. The return type is a string array with the filenames.
> This array is useless to me and others since we need a file object array to do some operations with the file reference.
> applying any filter to File#listFiles(...) result in "unambigious method call" since IOFileFiter extends both java interfaces and java does not know which to resolve.
> So am asking to split implemetation or make is usable with listFiles methods somehow.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.