public class DirectoryFileFilter extends AbstractFileFilter
Depending on how it's initialized, it can also show hidden directories. The default behavior is to not show hidden directories.
showHidden
Constructor and Description |
---|
DirectoryFileFilter()
Default constructor that initializes the DirectoryFileFilter with it's default behavior, meaning hidden directories
will not be shown.
|
DirectoryFileFilter(boolean includeHiddenDirectories)
Constructor that initializes the DirectoryFileFilter with the behavior defined by the parameter
showHidden . |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(File file) |
isFileHidden, isShowHidden, setShowHidden
public DirectoryFileFilter()
public DirectoryFileFilter(boolean includeHiddenDirectories)
Constructor that initializes the DirectoryFileFilter with the behavior defined by the parameter
showHidden
.
true
will enable the display of hidden directories.false
will enable the default behavior of not showing hidden directories.includeHiddenDirectories
- Defines whether to show hidden directories or not.public boolean accept(File file)
accept
in interface FileFilter
accept
in class AbstractFileFilter
Copyright © 2015. All Rights Reserved.