org.apache.commons.vfs
Class FileDepthSelector

java.lang.Object
  extended by org.apache.commons.vfs.FileDepthSelector
All Implemented Interfaces:
FileSelector
Direct Known Subclasses:
FileFilterSelector

public class FileDepthSelector
extends java.lang.Object
implements FileSelector

A FileSelector that selects all files in a particular depth range.

Version:
$Revision: 763740 $ $Date: 2009-04-09 19:22:31 +0200 (Do, 09. Apr 2009) $
Author:
Adam Murdoch

Constructor Summary
FileDepthSelector(int minDepth, int maxDepth)
           
 
Method Summary
 boolean includeFile(FileSelectInfo fileInfo)
          Determines if a file or folder should be selected.
 boolean traverseDescendents(FileSelectInfo fileInfo)
          Determines whether a folder should be traversed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileDepthSelector

public FileDepthSelector(int minDepth,
                         int maxDepth)
Method Detail

includeFile

public boolean includeFile(FileSelectInfo fileInfo)
Determines if a file or folder should be selected.

Specified by:
includeFile in interface FileSelector
Parameters:
fileInfo - The file selection information
Returns:
true if the file or folder should be included, false otherwise.

traverseDescendents

public boolean traverseDescendents(FileSelectInfo fileInfo)
Determines whether a folder should be traversed.

Specified by:
traverseDescendents in interface FileSelector
Parameters:
fileInfo - The file selection information
Returns:
true if the file or folder should be traversed, false otherwise.


Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.