I'm trying to get all subdirectories doing this:
File repositoryDir = new File(_props.getProperty("files.repository.path"));
IOFileFilter filter = new IOFileFilter() {
public boolean accept(File file) {
//return file.isDirectory();
return true;
}
@Override
public boolean accept(File arg0_, String arg1_) {
// TODO Auto-generated method stub
return false;
}
};
FileUtils.listFiles(repositoryDir,filter,null);
Unfortunately the List returned is empty.
On the other hand if I do this it works:
File[] mainLevelFiles = repositoryDir.listFiles();
Anyone has a clue on what wrong with Apaches FileUtils.listFiles(...)?