/*
|
* To change this license header, choose License Headers in Project Properties.
|
* To change this template file, choose Tools | Templates
|
* and open the template in the editor.
|
*/
|
package de.uhilger.filecms.pub;
|
|
import de.uhilger.wbx.web.TNServlet;
|
import java.io.File;
|
import java.io.FileFilter;
|
|
/**
|
*
|
* @author ulrich
|
*/
|
public class ImgFileFilter implements FileFilter {
|
@Override
|
public boolean accept(File pathname) {
|
boolean pass = true;
|
String fname = pathname.getName().toLowerCase();
|
if(fname.endsWith(TNServlet.JPEG) || fname.endsWith(TNServlet.JPG) || fname.endsWith(TNServlet.PNG)) {
|
if(fname.contains(TNServlet.GR) || fname.contains(TNServlet.KL) || fname.contains(TNServlet.MT) ||
|
fname.contains(TNServlet.SM) || fname.contains(TNServlet.TN)) {
|
pass = false;
|
}
|
}
|
return pass;
|
}
|
}
|