ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebo, Alex" <Alex.R...@acs-inc.com>
Subject RE: Resource Collections in 1.7
Date Thu, 04 Jan 2007 19:09:42 GMT
No problem :) And for the future references, the answer is "no".

So, to get a number of elements in the collection, say, fileset,
I have to create an "empty" set (let's refer to it as fs2) and:
<resourcecount>
  <difference>
    <fileset refid="fs1" />
    <fileset refid="fs2" />
  </difference>
</resourcecount>

?

That's sure one way to do things.
However, looking at <resources>, implementing ResourceCollection, 
I noticed that it exposes a common "collection" behavior:

iterator, size.

Q.: how can I refer to these features of the fileset?

<resources refid="fs1">
	<???/>
</resources> 

Many thanks!

-----Original Message-----
From: Matt Benson [mailto:gudnabrsam@yahoo.com]
Sent: Thursday, January 04, 2007 13:34
To: Ant Users List
Subject: Re: Resource Collections in 1.7


--- "Rebo, Alex" <Alex.Rebo@acs-inc.com> wrote:

Any relation to Max?  (sorry, couldn't resist...)

> 
> >Hello,
> >
> >Could you, please, help me to understand how to
> utilize Resource
> >Collections? 
> >
> >As an example, please, consider illustrating how
> Ant task may verify the
> >proper # of elements in a particular collection
> (say, number of files in a
> >fileset) or 
> >operate only on a subset of elements that different
> from the list obtained
> >in an earlier step (i.e., contents of some other
> directory, represented,
> >say, by a fileset).
> >

What?  You want to know how many elements of one
fileset are not in another fileset?  Given filesets f1
and f2:

<resourcecount>
  <difference>
    <fileset refid="fs1" />
    <fileset refid="fs2" />
  </difference>
</resourcecount>

Does that answer your question?

-Matt

> >Honestly tried to figure it out from the manual,
> but ...
> >
> >Many thanks!
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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