Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.vfs
Interface FileSelector

All Known Implementing Classes:
  AllFileSelector, FileDepthSelector, FileTypeSelector

public interface FileSelector

This interface is used to select files when traversing a file hierarchy.

Version:
  $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Mi, 29 Nov 2006) $
Author:
  Adam Murdoch
See Also:
  `Selectors`

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.

Method Detail

### includeFile

    public boolean includeFile(FileSelectInfo fileInfo)
                        throws Exception

  Determines if a file or folder should be selected. This method is called in depthwise order (that is, it is called for the children of a folder before it is called for the folder itself).

  Parameters:
    `fileInfo` - the file or folder to select.
  Returns:
    true if the file should be selected.
  Throws:
    `Exception`

### traverseDescendents

    public boolean traverseDescendents(FileSelectInfo fileInfo)
                                throws Exception

  Determines whether a folder should be traversed. If this method returns true, `includeFile(org.apache.commons.vfs.FileSelectInfo)` is called for each of the children of the folder, and each of the child folders is recursively traversed.

  This method is called on a folder before `includeFile(org.apache.commons.vfs.FileSelectInfo)` is called.

  Parameters:
    `fileInfo` - the file or folder to select.
  Returns:
    true if the folder should be traversed.
  Throws:
    `Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2006 The Apache Software Foundation. All Rights Reserved.