Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.cantaa.util.filefilter;
 
 import java.io.File;
Filter for Directories

Author(s):
Hans Lesmeister
 
public class DirectoryFilter implements FileFilter {

   

Checks if the specified file is a directory

Parameters:
file the file to check
Returns:
true if the file is a directory, otherwise false
   public boolean accept(File file)
   {
      return ((file != null) && file.isDirectory());
   }
New to GrepCode? Check out our FAQ X