ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: DirectoryScanner & Excluding Directories
Date Thu, 14 Sep 2000 06:42:33 GMT
>>>>> "DM" == David Medinets <> 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

(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?


View raw message