开发者

Ant in Groovy: Copying a single file

开发者 https://www.devze.com 2023-04-06 12:52 出处:网络
I know that when using Ant from Groovy, you can do somet开发者_Go百科hing like the following to copy files:

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

精彩评论

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

关注公众号