`
newLinuxJava
  • 浏览: 43070 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

ant 学习笔记 -- copy

    博客分类:
  • Ant
Ant 
阅读更多

  拷贝单个的文件:

〈copy tofile="old.txt" file="new.txt" /〉

注意:

  复制肯定还要涉及到同名覆盖的问题,ant在copy类的API中说明:Files are only copied if

the source file is newer than the destination file,这里的newer是指文件的修改时间,即使

你在修改时文件内容没有任何变化,只是导致修改时间变了,ant同样会覆盖同名文件,也就是

说, ant不会检查文件内容。


   也就是说,即使当 old.txt 文件内容与 new.txt 的有不同,但前者的修改时间不比后者新,ant 的copy 是不会进行的!

   在项目中遇到过,一开始莫名其妙的,查了才知道~~~
0
1
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics