Package org.apache.commons.vfs2
Interface FileSelector
-
- All Known Implementing Classes:
AllFileSelector,FileDepthSelector,FileExtensionSelector,FileFilterSelector,FileTypeSelector,InvertIncludeFileSelector,PatternFileSelector
public interface FileSelector
Selects what to traverse a file hierarchy.- See Also:
Selectors
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description booleanincludeFile(FileSelectInfo fileInfo)Tests if a file or folder should be selected.default booleantraverseDescendants(FileSelectInfo fileInfo)Tests whether a folder should be traversed.booleantraverseDescendents(FileSelectInfo fileInfo)Deprecated.
-
-
-
Method Detail
-
includeFile
boolean includeFile(FileSelectInfo fileInfo) throws java.lang.Exception
Tests 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:
java.lang.Exception- if an error occurs.
-
traverseDescendants
default boolean traverseDescendants(FileSelectInfo fileInfo) throws java.lang.Exception
Tests whether a folder should be traversed. If this method returns true,includeFile(org.apache.commons.vfs2.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.vfs2.FileSelectInfo)is called.- Parameters:
fileInfo- the file or folder to select.- Returns:
- true if the folder should be traversed.
- Throws:
java.lang.Exception- if an error occurs.- Since:
- 2.10.0
-
traverseDescendents
@Deprecated boolean traverseDescendents(FileSelectInfo fileInfo) throws java.lang.Exception
Deprecated.Tests whether a folder should be traversed. If this method returns true,includeFile(org.apache.commons.vfs2.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.vfs2.FileSelectInfo)is called.- Parameters:
fileInfo- the file or folder to select.- Returns:
- true if the folder should be traversed.
- Throws:
java.lang.Exception- if an error occurs.
-
-