开发者

Can ant replace task just deal with files after a timestamp?

开发者 https://www.devze.com 2023-04-11 22:07 出处:网络
The ant replace task i开发者_运维百科s not like copy task which have a overwrite property, copy task can copy files that modifytime is changed.

The ant replace task i开发者_运维百科s not like copy task which have a overwrite property, copy task can copy files that modifytime is changed.

How can I make replace task just deal with files be changed in copy task? or save a timestamp somewhere, let replace task just deal with files which modifytime is after the timestamp.


Try this :

<replace dir="${dir}" value="that" token="this">
   <include name="**/*.txt"/>
   <date datetime="${timestamp}" when="before"/>
</replace>

More infos :

http://ant.apache.org/manual/Types/fileset.html http://ant.apache.org/manual/Types/selectors.html#dateselect http://ant.apache.org/manual/Tasks/replace.html

0

精彩评论

暂无评论...
验证码 换一张
取 消