ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 22863] New: - Can't just rename a directory with the move task
Date Mon, 01 Sep 2003 18:27:20 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22863>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22863

Can't just rename a directory with the move task

           Summary: Can't just rename a directory with the move task
           Product: Ant
           Version: 1.5.4
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: gthb@dimon.is


I find myself having to resort to the <rename> task instead of the <move> task,
for just renaming a directory efficiently (i.e. without actually moving each
file in its subtree individually). Using <move> would clearly be preferred,
since <rename> is deprecated in favor of it -- but <move> makes me wait far
too long.

I tried several variants of <move>:

<move todir="${parent}/${newname}">
  <fileset dir="${parent}/${oldname}"/>
</move>

<move todir="${parent}/${newname}">
  <fileset dir="${parent}" includes="${oldname}"/>
</move>

<move todir="${parent}">
  <fileset dir="${parent}" includes="${oldname}"/>
  <mapper type="glob" from="${oldname}" to="${newname}"/>
</move>

<move todir="${parent}">
  <fileset dir="${parent}"/>
  <mapper type="glob" from="${oldname}" to="${newname}"/>
</move>

but they all resulted in a heavy-duty hard-disk-crunching file operation,
which is is completely unnecessary, and the <rename> task doesn't do that.

It may be that there *is* a way to do a simple directory rename using <move>
... if so, then there is still a bug: the bug is that it is not at all easy
to figure out how to do that! :)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message