cli.explorer
Class FileExplorer
java.lang.Object
cli.explorer.FileExplorer
public final class FileExplorer
- extends Object
Explore a directory and its sub-directories and apply {link FileProcedure
.
You can also use wildcard pattern to consider only a subset of files.
- Since:
- 5 nov. 2009 version 2.1.1
- Version:
- 2.1.1
- Author:
- Arnaud Malapert
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGGER
public static final Logger LOGGER
DIRECTORY_FILTER
public static final FileFilter DIRECTORY_FILTER
FILE_FILTER
public static final FileFilter FILE_FILTER
explore
public static void explore(FileProcedure proc,
File file,
String... wildcards)
explore
public static boolean explore(FileProcedure proc,
File file,
List<String> wildcards)
- Explore recursivly a directory and apply a procedure to each valid file.
- Parameters:
proc
- the procedure to applyfile
- the directory or a readable filewildcards
- wildcard patterns which filter filenames in the directories.
- Returns:
true
if it succeeds, false
if it failed and exploration has been interrupted.
main
public static void main(String[] args)
Copyright © 2012. All Rights Reserved.