如何使用 Ant、文件和文件夹`chmod -R +w`? [英] How to `chmod -R +w` with Ant, files and folders?

查看:34
本文介绍了如何使用 Ant、文件和文件夹`chmod -R +w`?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 Ant 构建脚本中执行与 chmod -R +w foo/ 等效的操作.

I'd like to do the equivalent of a chmod -R +w foo/ in an Ant build script.

到目前为止我正在使用这个:

So far I'm using this:

<chmod perm="g+w">
   <dirset dir="${basedir}/foo">
   </dirset>
   <fileset dir="${basedir}/foo">
   </fileset>
</chmod>

有没有更简洁的方法来编写文件夹递归?

Is there a neater way to write that to include files and folders recursively?

推荐答案

以下有效:

<chmod file="${basedir}/foo/**" perm="g+w" type="both"/>

与 OP 共享的积分.

Credits shared with the OP.

这篇关于如何使用 Ant、文件和文件夹`chmod -R +w`?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆