public class FileDepthSelector extends java.lang.Object implements FileSelector
FileSelector that selects all files in a particular depth range.| Modifier and Type | Field and Description |
|---|---|
private int |
maxDepth
The maximum depth
|
private int |
minDepth
The minimum depth
|
| Constructor and Description |
|---|
FileDepthSelector()
Creates a selector with the same minimum and maximum depths of 0.
|
FileDepthSelector(int minMaxDepth)
Creates a selector with the same minimum and maximum depths.
|
FileDepthSelector(int minDepth,
int maxDepth)
Creates a selector with the given minimum and maximum depths.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
includeFile(FileSelectInfo fileInfo)
Determines if a file or folder should be selected.
|
boolean |
traverseDescendents(FileSelectInfo fileInfo)
Determines whether a folder should be traversed.
|
private final int minDepth
private final int maxDepth
public FileDepthSelector(int minDepth,
int maxDepth)
minDepth - minimum depthmaxDepth - maximum depthpublic FileDepthSelector(int minMaxDepth)
minMaxDepth - minimum and maximum depthpublic FileDepthSelector()
public boolean includeFile(FileSelectInfo fileInfo) throws java.lang.Exception
includeFile in interface FileSelectorfileInfo - The file selection informationjava.lang.Exception - if an error occurs.public boolean traverseDescendents(FileSelectInfo fileInfo) throws java.lang.Exception
traverseDescendents in interface FileSelectorfileInfo - The file selection informationjava.lang.Exception - if an error occurs.