ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: proper use of filesets...
Date Wed, 23 Jun 2004 06:08:02 GMT
On Tue, 22 Jun 2004, EJ Ciramella <eciramella@upromise.com> wrote:
> What's the best way to use filesets (in tasks that support them)?
> 
> Delete, for example, you can use filesets two ways:
> 
>   <delete includeEmptyDirs="true">
>     <fileset dir="${parent.dir}/dir1"/>
>     <fileset dir="${parent.dir}/dir2"/>
>   </delete>

example edited with later correction by EJ.

> or 
> 
>   <delete includeEmptyDirs="true">
>     <fileset dir="${parent.dir}">
>      <include name="dir1"/>
>      <include name="dir2"/>
>     </fileset>
>   </delete>
> 
> I prefer the second example, but is there any benefit of one over
> the other?

They should be roughly equivalent in performance.

If you have some longer paths than just a single dir, something like

  <delete includeEmptyDirs="true">
    <fileset dir="${parent.dir}/A/B/C/D/E/dir1"/>
    <fileset dir="${parent.dir}/F/G/H/I/J/dir2"/>
  </delete>

separate filesets will be a lot faster in 1.5.x (and probably still a
bit faster in 1.6) than the above construct.

Stefan

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


Mime
View raw message