Package org.apache.commons.vfs2.filter
Class CanExecuteFileFilter
java.lang.Object
org.apache.commons.vfs2.filter.CanExecuteFileFilter
- All Implemented Interfaces:
- Serializable,- FileFilter
This filter accepts 
Files that can be executed.
 Example, showing how to print out a list of the current directory's executable files:
 FileSystemManager fsManager = VFS.getManager();
 FileObject dir = fsManager.toFileObject(new File("."));
 FileObject[] files = dir.findFiles(new FileFilterSelector(CanReadFileFilter.CAN_EXECUTE));
 for (int i = 0; i < files.length; i++) {
     System.out.println(files[i]);
 }
 
 Example, showing how to print out a list of the current directory's un-executable files:
 FileSystemManager fsManager = VFS.getManager();
 FileObject dir = fsManager.toFileObject(new File("."));
 FileObject[] files = dir.findFiles(new FileFilterSelector(CanReadFileFilter.CANNOT_EXECUTE));
 for (int i = 0; i < files.length; i++) {
     System.out.println(files[i]);
 }
 - Since:
- 2.4
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final FileFilterSingleton instance of executed filter.static final FileFilterSingleton instance of not executed filter.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanaccept(FileSelectInfo fileSelectInfo) Checks to see if the file can be executed.
- 
Field Details- 
CAN_EXECUTESingleton instance of executed filter.
- 
CANNOT_EXECUTESingleton instance of not executed filter.
 
- 
- 
Constructor Details- 
CanExecuteFileFilterprotected CanExecuteFileFilter()Restrictive constructor.
 
- 
- 
Method Details- 
acceptChecks to see if the file can be executed.- Specified by:
- acceptin interface- FileFilter
- Parameters:
- fileSelectInfo- the File to check.
- Returns:
- trueif the file can be executed, otherwise- false.
- Throws:
- FileSystemException- Thrown for file system errors.
 
 
-