ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc H. Graham" <dr...@bellatlantic.net>
Subject RE: List of directories that contain a file (ignore previous message)
Date Tue, 08 Nov 2005 23:20:40 GMT
Just a matter of getting rid of the include, which was restricting it to
one level.

-----Original Message-----
From: Dominique Devienne [mailto:ddevienne@gmail.com] 
Sent: Tuesday, November 08, 2005 3:02 PM
To: Ant Users List
Subject: Re: List of directories that contain a file


> Can anyone tell me how create a directory list such that each
directory
> contains a file with a given name? dirlist patterns test the name of
the
> directory. I want to test if the directory contains a file with a
given
> name.
>
> I can get the paths to the files with filelist, and then I could
select
> the dirnames. Do I have to iterate using foreach? How do I get the
> result to be a list of directories to pass in to some other task (in
> this case subant)?

Here's an example. --DD

    <!-- Gets all the directories with a Javadoc-generated index.html
-->
    <dirset id="-docdirs" dir="${javadocs}">
      <include name="*" />
      <present targetdir="${javadocs}" present="both">
        <mapper type="regexp" from="(.*)" to="\1/index.html" />
      </present>
    </dirset>

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




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


Mime
View raw message