1 22 23 package org.enhydra.kelp.common.importer; 24 25 import org.enhydra.kelp.common.Constants; 27 28 import java.io.FileFilter ; 30 import java.io.File ; 31 32 public class MakefileFilter implements FileFilter { 33 34 37 public MakefileFilter() {} 38 39 42 public boolean accept(File f) { 43 boolean acceptFile = false; 44 if (f == null) { 45 acceptFile = true; 46 } else if (f.isDirectory()) { 47 acceptFile = true; 48 } else { 49 String lowPath = f.getAbsolutePath().toLowerCase(); 50 acceptFile = lowPath.endsWith(File.separator + Constants.FILE_MAKEFILE) || 51 lowPath.endsWith(File.separator + Constants.FILE_CONFIG_MK); 52 53 } 54 return acceptFile; 55 } 56 57 } 58 | Popular Tags |