Jorge Spinsanti created IO-489:
----------------------------------
Summary: 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:
~/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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)