AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
# B.50 UpToDateTask `UpToDateTask` tests if a file is newer than another file or files and sets a property if it is. This is a common way to avoid, possibly time consuming, creation of a target if none of the files/resources it depends on have changed. Table B.52:聽Attributes NameTypeDescriptionDefaultRequired`property``String`Name of the property that is to be setn/aYes`value``String`The value the property is to be set to`true`No`srcfile``String`The file to check against target file(s)n/aYes (or nested `fileset`)`targetfile``String`The file for which we want to determine the statusn/aYes (or nested` mapper`) B.50.1 Examples ``` <uptodate property="propelBuild.notRequired" targetfile="${deploy}/propelClasses.tgz"> <fileset dir="${src}/propel"> <include="**/*.php"/> </fileset> </uptodate> ``` The above example sets the property `propelBuild.notRequired` to true if the `${deploy}/propelClasses.tgz` file is more up-to-date than any of the PHP class files in the `${src}/propel` directory. ``` <target name="CompileTarget"> <uptodate property="target.uptodate" targetfile="main"> <fileset refid="sources"/> </uptodate> <if> <not><isset property="target.uptodate"/></not> <then> <!-- Some commands to update the target ... --> </then> </if> </target> ``` The above example shows a common use when doing a "compile" type target where a single target depends on other source files. In this case the commands to update the target (whatever they are) are only run if any of the source files are more up to date than the target. B.50.2 Supported Nested Tags - `filelist` - `fileset` - `mapper`