Can Ant's recursive chmod compete with exec in terms of speed?

Viewed 4364

I want to chmod recursively in my build.xml and borrowed the following from this post:

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

It's unbelievably slow since that directory is deep and includes a large number of files.

This works much better & faster:

<exec executable="chmod" dir="${basedir}/foo" failonerror="true">
    <arg line="-R 0755 ." />
</exec>
  • Are there any downsides of using exec? Speed is of importance.
  • If yes; am I using chmod incorrectly?
1 Answers
Related