1 package de.jwi.jgallery; 2 3 24 25 import java.io.File ; 26 27 32 public class DirectoriesFilter implements java.io.FilenameFilter 33 { 34 private String thumbsDirName; 35 private String ignoreFileName; 36 37 public DirectoriesFilter(String thumbsDirName,String ignoreFileName) 38 { 39 this.thumbsDirName=thumbsDirName; 40 this.ignoreFileName=ignoreFileName; 41 } 42 public boolean accept(File dir, String name) 43 { 44 File f = new File (dir, name); 45 if (!f.isDirectory()) 46 { 47 return false; 48 } 49 50 if (thumbsDirName.equals(name)) return false; 51 52 File f1 = new File (f,ignoreFileName); 53 if (f1.exists()) 54 { 55 return false; 56 } 57 58 return true; 59 } 60 } 61 | Popular Tags |