ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prateek Asthana" <hkprat...@gmail.com>
Subject FileSet behavior
Date Sun, 11 May 2008 01:30:26 GMT
Hi,
This is to understand fileset attribute behavior. Definition of
FileSet is that it is a group of files.

My observation about Fileset is that depending upon the context it
behaves differently. I have given two scenarios below. Please help me
understand correctly.

First scenario:

   <path id="temp1">
       <fileset dir="${module.testautomap.basedir}">
       </fileset>
   </path>

    Above case, temp1 only contains files even though base directory
has empty directories. So I assume, fileset only returns files and not
empty directory.


Second Scnarios:
<copy todir="${testautomap.output.dir}">
           <fileset dir="${module.testautomap.basedir}/src">
           </fileset>
       </copy>

In the second scenario, even empty directories are copied implying
fileset even returns empty directories.

In fact we also have a selector <type type="file"> that can be used
with fileset. So I am confused as to what all does fileset return.
Does it return only files or also directories? If both, why does my
first scenario only print files and not directories.

Thanks,
Prateek

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


Mime
View raw message