public interface FileObjectFilter
Modifier and Type | Field and Description |
---|---|
static int |
DO_NOT_TRAVERSE
constant representing answer "do not traverse the folder"
|
static int |
TRAVERSE
constant representing answer "traverse the folder"
|
static int |
TRAVERSE_ALL_SUBFOLDERS
constant representing answer "traverse the folder and all its direct
and indirect children (both files and subfolders)"
|
Modifier and Type | Method and Description |
---|---|
boolean |
searchFile(FileObject file)
Answers a question whether a given file should be searched.
|
int |
traverseFolder(FileObject folder)
Answers a questions whether a given folder should be traversed
(its contents searched).
|
static final int DO_NOT_TRAVERSE
static final int TRAVERSE
static final int TRAVERSE_ALL_SUBFOLDERS
boolean searchFile(FileObject file) throws IllegalArgumentException
true
if the given file should be searched;
false
if notIllegalArgumentException
- if the passed FileObject
is a folderint traverseFolder(FileObject folder) throws IllegalArgumentException
FileObjectFilter.DO_NOT_TRAVERSE
,
FileObjectFilter.TRAVERSE
,
FileObjectFilter.TRAVERSE_ALL_SUBFOLDERS
;
if TRAVERSE_ALL_SUBFOLDERS
is returned,
this filter will not be applied on the folder's children
(both direct and indirect, both files and folders)IllegalArgumentException
- if the passed FileObject
is not a folder