Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to iterate fileset?

 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have following Ant code where we are getting <fileset>

<fileset id="id1" dir="D:/SN/two" includes="**/*.java">
<depend targetdir="D:/SN/one"/>
</fileset>

I want to iterate this <fileset>. How to achieve this?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll have to provide more information. FileSets are properties of Ant tasks, so it depends on the Ant task you're attempting to execute.
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are using Depend Selector. Basically it compares files at given two locations and give list of recently modified files as a FileSet.

http://ant.apache.org/manual/CoreTypes/selectors.html#dependselect
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Knock Knock!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34837
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use the ant-contrib for loop task.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic