首页 > 代码库 > ant学习之delete

ant学习之delete

<?xml version="1.0" ?><project name="antCopy" default="target1" basedir="../">    <target name="target1">        <delete file="E:/workspace/AntDemo/ant/test/test02/1.txt" />        <delete dir="E:/workspace/AntDemo/ant/test/test03" />        <delete includeemptydirs="true">                <fileset dir="E:/workspace/AntDemo/ant/test/test02" excludes="*.bak"></fileset>        </delete>    </target></project>

<!--
 delete 命令
    对文件或目录进行删除,举例如下:
eg1. 删除某个文件:
<delete file="/home/photos/philander.jpg"/>
eg2. 删除某个目录:
<delete dir="/home/photos"/>
eg3. 删除所有的备份目录或空目录:
<delete includeEmptyDirs="true">
       <fileset dir="." includes="**/*.bak"/>
</delete>
<delete includeEmptyDirs="true">
       <fileset dir="." excludes="**/*.bak"/>
</delete>
-->

ant学习之delete