commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (IO-151) Provide other Filter implementation
Date Fri, 28 Dec 2007 10:56:43 GMT

    [ 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.


Mime
View raw message