1 3 package jodd.io.findfile; 4 5 import jodd.util.Wildcard; 6 7 import java.io.File ; 8 9 13 public class WildcardFindFile extends FindFile { 14 15 protected String wildcard; 16 17 public WildcardFindFile(String wildcard) { 18 this.wildcard = wildcard; 19 20 } 21 22 public WildcardFindFile(String searchPath, String wildcard) { 23 this.wildcard = wildcard; 24 searchPath(searchPath); 25 } 26 27 public WildcardFindFile(File searchPath, String wildcard) { 28 this.wildcard = wildcard; 29 searchPath(searchPath); 30 } 31 32 33 public WildcardFindFile(String [] searchPath, String wildcard) { 34 this.wildcard = wildcard; 35 searchPath(searchPath); 36 } 37 38 protected boolean onFileEntry(File currentFile) { 39 return Wildcard.match(currentFile.getName(), wildcard); 40 } 41 } 42 | Popular Tags |