Reputation: 13
I am looking for a means to have Ant check a target directory for the existence of files in a list/set defined by a source directory.
The Ant target only needs to determine if the files in a source directory also currently exist in the target directory. No copying/moving/deleting necessary.
Can this be done in Ant?
Upvotes: 1
Views: 289
Reputation: 78225
Take a look at the Ant resource collection set operators. For example:
<fileset id="source" dir="source_dir" />
<fileset id="target" dir="target_dir" />
<difference id="difference">
<resources refid="source"/>
<resources refid="target"/>
</difference>
<echo message="${toString:difference}" />
You can use a dirset if you're only interested in directories.
Upvotes: 1