0
我的目录结构,如:如何用Ant编写目录结构?
-first_dir
-a
-b
-c
-second_dir
-a
-b
-c
我想没有重复创建在蚂蚁1.7 path
元素。这path
s元素我想用于检查条件waitfor
任务中的文件的可用性。 这是干什么的?
我的目录结构,如:如何用Ant编写目录结构?
-first_dir
-a
-b
-c
-second_dir
-a
-b
-c
我想没有重复创建在蚂蚁1.7 path
元素。这path
s元素我想用于检查条件waitfor
任务中的文件的可用性。 这是干什么的?
如果我正确理解你的问题,这是可以帮助你(从蚂蚁文件集文档):
<fileset dir="${server.src}" casesensitive="yes">
<patternset id="non.test.sources">
<include name="**/*.java"/>
<exclude name="**/*Test*"/>
</patternset>
</fileset>
你可以调整它为您的需求是这样的:
<path id="result.path">
<fileset dir="first_dir" casesensitive="yes">
<patternset id="sub.dirs">
<include name="a"/>
<include name="b"/>
<include name="c"/>
</patternset>
</fileset>
<fileset dir="second_dir" casesensitive="yes">
<patternset refid="sub.dirs" />
</fileset>
</path>
请出示您的预期产出。你认为first_dir/a和second_dir/a是重复的还是可以的? – 2011-04-28 14:38:45