开发者

Ant in Groovy: Copying a single file

I know that when using Ant from Groovy, you can do somet开发者_Go百科hing like the following to copy files:

copy(todir:myDir) {
  fileset(dir:"src/test") {
    include(name:"**/*.groovy")
  }
}

Is there a more efficient, and elegant way to copy a single file?


How about:

new AntBuilder().copy( file:"$sourceFile.canonicalPath", 
                           tofile:"$destFile.canonicalPath")
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜