Package org.apache.commons.vfs2
Class FileDepthSelector
java.lang.Object
org.apache.commons.vfs2.FileDepthSelector
- All Implemented Interfaces:
- FileSelector
- Direct Known Subclasses:
- FileFilterSelector
A 
FileSelector that selects all files in a particular depth range.- 
Constructor SummaryConstructorsConstructorDescriptionCreates 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.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanincludeFile(FileSelectInfo fileInfo) Determines if a file or folder should be selected.booleantraverseDescendents(FileSelectInfo fileInfo) Determines whether a folder should be traversed.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.vfs2.FileSelectortraverseDescendants
- 
Constructor Details- 
FileDepthSelectorpublic FileDepthSelector()Creates a selector with the same minimum and maximum depths of 0.- Since:
- 2.1
 
- 
FileDepthSelectorCreates a selector with the same minimum and maximum depths.- Parameters:
- minMaxDepth- minimum and maximum depth
- Since:
- 2.1
 
- 
FileDepthSelectorCreates a selector with the given minimum and maximum depths.- Parameters:
- minDepth- minimum depth
- maxDepth- maximum depth
 
 
- 
- 
Method Details- 
includeFileDetermines if a file or folder should be selected.- Specified by:
- includeFilein interface- FileSelector
- Parameters:
- fileInfo- The file selection information
- Returns:
- true if the file or folder should be included, false otherwise.
- Throws:
- Exception- if an error occurs.
 
- 
traverseDescendentsDetermines whether a folder should be traversed.- Specified by:
- traverseDescendentsin interface- FileSelector
- Parameters:
- fileInfo- The file selection information
- Returns:
- true if the file or folder should be traversed, false otherwise.
- Throws:
- Exception- if an error occurs.
 
 
-