在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 教程/ Linux/ Ant長度任務(wù)
Ant Telnet任務(wù)
Ant Javac任務(wù)
Apache Ant構(gòu)建文件-project標(biāo)簽
Apache Ant任務(wù)失敗
Apache Ant目標(biāo)-target標(biāo)簽
Apache Ant API
Ant Condition任務(wù)
Ant過濾器任務(wù)
Ant Mkdir創(chuàng)建目錄任務(wù)
Ant休眠任務(wù)
Apache Ant入門程序(Hello World)
Apache Ant InputHandler接口
Ant JUnit任務(wù)
Apache Ant自定義組件
Apache Ant參數(shù)處理器
Apache Ant令牌過濾器
Apache Ant IDE集成
Ant Concat任務(wù)
Apache Ant安裝
ANT教程
Apache Ant類型
Ant EAR任務(wù)
Ant簡介
Ant長度任務(wù)
Ant Chmod任務(wù)
Ant LoadFile任務(wù)
Ant導(dǎo)入任務(wù)
Apache Ant If和Unless用法
Ant Gzip任務(wù)
Ant移動文件任務(wù)
Apache Ant Jar示例
Apache Ant任務(wù)-task標(biāo)簽
Apache Ant監(jiān)聽器和記錄器
Ant AntStructure任務(wù)
Ant刪除任務(wù)
Apache Ant Java任務(wù)
Apache Ant basename任務(wù)
Ant Zip任務(wù)
Ant之外的Apache Ant任務(wù)
Ant Copy任務(wù)
Ant CVS任務(wù)
Apache Ant命令行參數(shù)
Apache Ant功能特性
Apache Ant屬性
Ant War任務(wù)

Ant長度任務(wù)

此任務(wù)用于設(shè)置任何字符串或文件的長度屬性。它也可以用于顯示屬性值或作為條件。
它具有以下給出的各種屬性。

1. Apache Ant長度任務(wù)屬性

屬性 描述 必需
property 用于設(shè)定長度
mode 與文件長度模式一起使用
file 要報告其長度的單個文件
resource 報告長度的單一資源
string 要報告的長度的字符串
trim 在處理字符串時修剪
length 比較長度
when 比較類型:equal, eqgreater等等

下面來看看一些設(shè)置字符串和文件長度的例子。

2. Apache Ant長度任務(wù)示例

存儲字符串長度:

<project name="java-ant project" default="run">     
    <target name="run">  
        <length string="Hello Javatpoint" property="length.foo"/>  
        <echo message="length is: ${length.foo}"></echo>  
    </target>  
</project>

存儲文件長度:

<project name="java-ant project" default="run">     
    <target name="run">  
        <length file="abc" property="length.abc"/>  
    </target>  
</project>

將文件路徑及其長度存儲到length屬性中。

<project name="java-ant project" default="run">     
    <target name="run">  
        <length property="length" mode="each">  
            <fileset dir="." includes="abc,xyz"/>  
        </length>  
    </target>  
</project>