ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: how to convert path to fileset
Date Mon, 29 Mar 2004 18:56:21 GMT
--- Brian Lalor <blalor@deltafaucet.com> wrote:
> On Mar 29, 2004, at 12:31 PM, Daniels, Doug wrote:
> 
> > I hope this helps.
> 
> It does, thanks.  I'm surprised, frankly, that this
> functionality isn't 
> built in to Ant, because it seems like a fairly
> simple thing.

Again, you can compose a <path> of 1...n <fileset>s. 
It is also possible to use basic Ant to create a
<fileset> from a path using <pathconvert> with a
nested <map> or <mapper> element to strip off the
common ancestor:

<property name="fs" value="${file.separator}" />
<pathconvert property="incpatn" pathsep=",">
  <path id="mypath" />
  <map from="ancestor${fs}path${fs}" to="" />
</pathconvert>

<fileset dir="ancestor${fs}path" includes="incpatn" />

-Matt

__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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


Mime
View raw message