private static final class FileToBytesExporter.Glob
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
private static class |
FileToBytesExporter.Glob.Visitor<E extends java.nio.file.Path>
|
Static visitor for exploring the file tree -
it has the same behavior as creating an
instance of
SimpleFileVisitor .
|
Modifier | Constructor | Description |
---|---|---|
private |
Glob()
|
Modifier and Type | Method | Description |
---|---|---|
(package private) static
java.util.ArrayList<java.io.File> |
match(java.io.File workingDirectory,
java.lang.String glob,
boolean mustInspectAllDirs) |
Matches all files corresponding the specified glob (
see
Glob
for more information).
|
static java.util.ArrayList<java.io.File> match(java.io.File workingDirectory, java.lang.String glob, boolean mustInspectAllDirs) throws java.io.IOException
Matches all files corresponding the specified glob ( see Glob for more information).
Glob is only working at the current working directory, that
must be included always,
cannot be null
and it must exists
.
If not, a InvalidPathException
is thrown.
The String
glob must contain a filename or a
glob sequence (see the link
referenced before for more information). It cannot be null
or an empty String
(""
). If not, an
IllegalArgumentException
is thrown.
workingDirectory
- current working directory as
File
- it must exists and
cannot be null
.
glob
- glob that matches a filename or a
glob
sequence. It cannot be null
or an empty
String
""
.
mustInspectAllDirs
- if set to
true
, it will navigate through the entire
dirs and subdirectories, looking for the specified file.
Else,
it will just look for the files at current folder.
ArrayList
with the found files,
null
if no files were found.
java.io.IOException
- if there was an error
while visiting some file for
obtaining its information, with the filename and a
complete cause.
InvalidPathException
- when the workingDirectory
does not exists or
it
is null
.
java.lang.IllegalArgumentException
- when the
glob
is null
or an empty String
""
.