You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2017/04/18 09:50:41 UTC

[jira] [Commented] (IO-531) make it more esay-to-use: org.apache.commons.io.FileUtils.listFiles(File, IOFileFilter, IOFileFilter)

    [ https://issues.apache.org/jira/browse/IO-531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15972422#comment-15972422 ] 

Sebb commented on IO-531:
-------------------------

The Javadoc [1] says:
"dirFilter optional filter to apply when finding subdirectories. If this parameter is null, subdirectories will not be included in the search. Use TrueFileFilter.INSTANCE to match all directories.
R"

Does FileUtils.listFiles(File, filter, TrueFileFilter.INSTANCE) not work for you?

[1] http://commons.apache.org/proper/commons-io/javadocs/api-2.5/org/apache/commons/io/FileUtils.html#listFiles(java.io.File,%20org.apache.commons.io.filefilter.IOFileFilter,%20org.apache.commons.io.filefilter.IOFileFilter)

> make it more esay-to-use: org.apache.commons.io.FileUtils.listFiles(File, IOFileFilter, IOFileFilter)
> -----------------------------------------------------------------------------------------------------
>
>                 Key: IO-531
>                 URL: https://issues.apache.org/jira/browse/IO-531
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 2.5
>            Reporter: Hao Liu
>
> when I only want to filter the directories, it should be better to allow me to set the second parameter to null or I have to implement the org.apache.commons.io.filefilter.IOFileFilter interface with nothing functionally task to do.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)