Ant内置任务之resourcecount

xiaoxiao2021-02-28  19

一、概述

        resourcecount是Ant内置任务,Ant1.7引入,用于显示或设置一个包含内嵌资源集合数量的属性。

二、属性

        property:要设置的属性,如果不设置结果写入控制台,resourcecount作为条件时忽略。

        refid:资源集合的引用。

        count:作为条件时用于比较的值。

        when:比较类型:equal,eq,greater,gt,less,lt,ge(大于等于),ne(不等于),le(小于等于)。作为条件时使用,默认为equal。

三、简单示例

<project> <fileset id="files" dir="../" includes="*/*"/> <resourcecount refid="files" property="count"> </resourcecount> <echo>${count}</echo> </project>
转载请注明原文地址: https://www.6miu.com/read-1450016.html

最新回复(0)