[
https://issues.apache.org/jira/browse/IO-489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jorge Spinsanti updated IO-489:
-------------------------------
Description:
My directory tree:
{code}
~/ioutils> ls -lhR
.:
total 20K
drwxrwxr-x 2 jorge jorge 4.0K Dec 2 14:54 empty/
drwxrwxr-x 2 jorge jorge 4.0K Dec 2 14:54 not-empty/
-rw-rw-r-- 1 jorge jorge 5 Dec 2 15:02 text.txt
./empty:
total 0
./not-empty:
total 12K
-rw-rw-r-- 1 jorge jorge 5 Dec 2 14:54 text.txt
{code}
When I execute:
{code}
FileUtils.listFilesAndDirs(new File(baseDir),
FileFilterUtils.and(
DirectoryFileFilter.DIRECTORY,
EmptyFileFilter.EMPTY
),
TrueFileFilter.TRUE)
{code}
I obtain:
{code}
[/home/jorge/ioutils, /home/jorge/ioutils/not-empty, /home/jorge/ioutils/empty]
{code}
Issue: not-empty is included.
was:
My directory tree:
~/ioutils> ls -lhR
.:
total 20K
drwxrwxr-x 2 jorge jorge 4.0K Dec 2 14:54 empty/
drwxrwxr-x 2 jorge jorge 4.0K Dec 2 14:54 not-empty/
-rw-rw-r-- 1 jorge jorge 5 Dec 2 15:02 text.txt
./empty:
total 0
./not-empty:
total 12K
-rw-rw-r-- 1 jorge jorge 5 Dec 2 14:54 text.txt
When I execute:
FileUtils.listFilesAndDirs(new File(baseDir),
FileFilterUtils.and(
DirectoryFileFilter.DIRECTORY,
EmptyFileFilter.EMPTY
),
TrueFileFilter.TRUE)
I obtain:
[/home/jorge/ioutils, /home/jorge/ioutils/not-empty, /home/jorge/ioutils/empty]
Issue: not-empty is included.
> EmptyFileFilter doesn't work on directories
> -------------------------------------------
>
> Key: IO-489
> URL: https://issues.apache.org/jira/browse/IO-489
> Project: Commons IO
> Issue Type: Bug
> Components: Filters
> Affects Versions: 2.4
> Environment: Distributor ID: Ubuntu
> Description: Ubuntu 12.04.5 LTS
> Release: 12.04
> Codename: precise
> Reporter: Jorge Spinsanti
>
> My directory tree:
> {code}
> ~/ioutils> ls -lhR
> .:
> total 20K
> drwxrwxr-x 2 jorge jorge 4.0K Dec 2 14:54 empty/
> drwxrwxr-x 2 jorge jorge 4.0K Dec 2 14:54 not-empty/
> -rw-rw-r-- 1 jorge jorge 5 Dec 2 15:02 text.txt
> ./empty:
> total 0
> ./not-empty:
> total 12K
> -rw-rw-r-- 1 jorge jorge 5 Dec 2 14:54 text.txt
> {code}
> When I execute:
> {code}
> FileUtils.listFilesAndDirs(new File(baseDir),
> FileFilterUtils.and(
> DirectoryFileFilter.DIRECTORY,
> EmptyFileFilter.EMPTY
> ),
> TrueFileFilter.TRUE)
> {code}
> I obtain:
> {code}
> [/home/jorge/ioutils, /home/jorge/ioutils/not-empty,
> /home/jorge/ioutils/empty]
> {code}
> Issue: not-empty is included.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)