>>>>> "DM" == David Medinets <[EMAIL PROTECTED]> writes:

 DM> I feel the above exclude should work, but it doesn't because if
 DM> IsExcluded test only occurs inside the IsIncluded test.

It depends on what you mean by "exclude should work". The
file/directory named images should not be listed in one of the
getIncluded... methods.

DirectoryScanner assigns three states to files or directories:

(1) included - what you'd expect. This file/dir has matched an include
pattern.

(2) excluded - This file/dir matches both an include and an exclude
pattern, exclude wins.

(3) not included - This file/dir doesn't match an include pattern.

So the opposite of getIncludedFiles() is the union of
getExcludedFiles() and getNotIncludedFiles().

I think we could savely change the semantics if they seem
counterintuitive as no tasks I'm aware of call anything but the
getIncluded... methods - or maybe we just need better documentation?

Stefan

Reply via email to