DUH! I totally missed that, thanks for pointing that out. So, with the following:
File configCellsDir = new File( FilenameUtils.concat( wasProfile , "config/cells" ) ) ; String[] cellNames = configCellsDir.list( DirectoryFileFilter.INSTANCE ) ; I can get all the subdirectories directly under the 'cells' directory. But I take it there is no way to find subdirectories recursively? The 'dmgr' subdir is several levels deep, and trying this doesn't work: WildcardFileFilter dmgrFilter = new WildcardFileFilter( "*dmgr*" ) ; String[] dmgrDirs = configCellsDir.list( dmgrFilter ) ; Is there any way to do this, without having to write my own DirectoryWalker implementation? Thanks again! DLW Jukka Zitting <[email protected]> wrote on 10/29/2009 10:39:27 AM: > [image removed] > > Re: commons-io : FileFilters > > Jukka Zitting > > to: > > Commons Users List > > 10/29/2009 10:40 AM > > Please respond to "Commons Users List" > > Hi, > > On Thu, Oct 29, 2009 at 3:15 PM, Dave Westerman <[email protected]> wrote: > > I'm trying to use Apache Commons IO FileFilters, and it's obvious I don't > > clearly understand them, because I can't get them to work trying to find a > > subdirectory. > > [...] > > Can anyone tell me what I'm doing wrong? > > The findFiles() method will only return files, not directories. > > BR, > > Jukka Zitting > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >
