Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: java.io.FileFilter

The lists of files or file names returned by the File listFiles() and list() methods include all files and directories.

Tutorial Details:

The lists of files or file names returned by the File listFiles() and list() methods include all files and directories. The files/directories that are included may be restricted by passing a java.io.FileFilter to these methods.
Creating a java.io.FileFilter
Create a class that implements the javax.io.FileFilter interface, which means that you must define the boolean accept() method. For example, to create a filter that accepts all directories and HTML files.


 

Rate Tutorial:
http://www.roseindia.net/java/java-tips/io/10file/40listfile-filefilter.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
java.io.FileFilter

View Tutorial:
java.io.FileFilter

Related Tutorials:

Java Tip 83: Use filters to access resources in Java archives - JavaWorld
Java Tip 83: Use filters to access resources in Java archives - JavaWorld
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.