public class FileFileFilter extends Object implements FileFilter, Serializable
File
s that are files (not directories).
For example, here is how to print out a list of the real files within the current directory:
FileSystemManager fsManager = VFS.getManager(); FileObject dir = fsManager.toFileObject(new File(".")); FileObject[] files = dir.findFiles(new FileFilterSelector(FileFileFilter.FILE)); for (int i = 0; i < files.length; i++) { System.out.println(files[i]); }
Modifier and Type | Field and Description |
---|---|
static FileFilter |
FILE
Singleton instance of file filter.
|
Modifier | Constructor and Description |
---|---|
protected |
FileFileFilter()
Restrictive constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(FileSelectInfo fileSelectInfo)
Checks to see if the file is a file.
|
public static final FileFilter FILE
public boolean accept(FileSelectInfo fileSelectInfo) throws FileSystemException
accept
in interface FileFilter
fileSelectInfo
- the File to checkFileSystemException
- Thrown for file system errors.Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.