ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Atherton <br...@callenish.com>
Subject RE: reverse glob mapper pattern?
Date Tue, 24 Sep 2002 01:12:42 GMT
At 11:33 AM 9/23/2002 -0700, Diane Holt wrote:

>No, it selects it says it does -- namely, it selects only those files that
>have an equivalent, as specified. It doesn't say it'll return *both* the
>files that have an equivalent *and* the equivalent file(s) as well.

Ok, perhaps I misunderstood the original request. I thought he wanted to 
keep the sample files, since those were the ones that generated the others.

If the problem is getting both sets of files, it should be doable with a 
single fileset.

     <delete>
         <fileset src="${src.dir}">
             <or>
                 <present>
                     <mapper type="glob" from="sample.*" to="*" />
                 </present>
                 <present>
                     <mapper type="glob" from="*" to="sample.*" />
                 </present>
             </or>
         </fileset>
     </delete>

This appears to get around the "file already deleted" problem you 
mentioned, Diane. In my tests, the <delete> task did not prematurely delete 
the individual files before the whole fileset had been processed by 
DirectoryScanner. I don't know if that is true for all tasks which might 
change the contents of the fileset, though.



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message