Evaluate the selector with the file.
if (file == null) {
throw new BuildException("file attribute not set");
}
validate();
File myBaseDir = baseDir;
if (myBaseDir == null) {
myBaseDir = getProject().getBaseDir();
}
FileSelector f = getSelectors(getProject())[0];
return f.isSelected(
myBaseDir, FILE_UTILS.removeLeadingPath(myBaseDir, file), file);