public final class DirWalker extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
DirWalker.IEntry<T> |
| Modifier and Type | Method and Description |
|---|---|
static List<File> |
dir(File srcdir,
boolean files,
boolean dirs)
Get a list of all files, directories under a given directory.
|
static <T> T |
scan(File srcdir,
DirWalker.IEntry<T> handler)
Walk a directory recursively and call a function for every entry found.
|
@Nullable public static <T> T scan(@Nonnull File srcdir, @Nonnull DirWalker.IEntry<T> handler) throws Exception
srcdir - handler - Exception@Nonnull public static List<File> dir(@Nonnull File srcdir, boolean files, boolean dirs) throws Exception
srcdir - The source dirfiles - T if you want files to be included in the listdirs - T if you want directories to be included in the list.ExceptionCopyright © 2017 etc.to. All rights reserved.