commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] [Commented] (IO-531) make it more esay-to-use:, IOFileFilter, IOFileFilter)
Date Thu, 20 Apr 2017 09:38:04 GMT


Sebb commented on IO-531:

If I read you correctly, you want

FileUtils.listFiles(File, null, dirfilter)

to act as if you had coded

FileUtils.listFiles(File, TrueFileFilter.TRUE, dirfilter)

Is that correct?

I don't think that is a good idea, because null means the opposite - i.e. FalseFileFilter.FALSE
- for the directory filter parameter.
That would be confusing.

It also seems unnecessary, given that there is already a (singleton) object which can be used
(i.e. TrueFileFilter.TRUE).

> make it more esay-to-use:, IOFileFilter,
> -----------------------------------------------------------------------------------------------------
>                 Key: IO-531
>                 URL:
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 2.5
>            Reporter: Hao Liu
>         Attachments: Commons IOIO-531.pdf
> 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
interface with nothing functionally task to do.

This message was sent by Atlassian JIRA

View raw message