FileDocCategorySizeDatePackage
HiddenFileFilter.javaAPI DocAndroid 1.5 API2463Wed May 06 22:42:46 BST 2009org.apache.commons.io.filefilter

HiddenFileFilter

public class HiddenFileFilter extends AbstractFileFilter implements Serializable
This filter accepts Files that are hidden.

Example, showing how to print out a list of the current directory's hidden files:

File dir = new File(".");
String[] files = dir.list( HiddenFileFilter.HIDDEN );
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 visible (i.e. not hidden) files:

File dir = new File(".");
String[] files = dir.list( HiddenFileFilter.VISIBLE );
for ( int i = 0; i < files.length; i++ ) {
System.out.println(files[i]);
}
since
Commons IO 1.3
version
$Revision: 587916 $

Fields Summary
public static final IOFileFilter
HIDDEN
Singleton instance of hidden filter
public static final IOFileFilter
VISIBLE
Singleton instance of visible filter
Constructors Summary
protected HiddenFileFilter()
Restrictive consructor.

    
           
      
    
Methods Summary
public booleanaccept(java.io.File file)
Checks to see if the file is hidden.

param
file the File to check
return
true if the file is hidden, otherwise false.

        return file.isHidden();