You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Niall Pemberton (JIRA)" <ji...@apache.org> on 2008/01/10 15:10:34 UTC

[jira] Commented: (IO-77) Add convenience moveFile() / moveDirectory methods to FileUtils

    [ https://issues.apache.org/jira/browse/IO-77?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557648#action_12557648 ] 

Niall Pemberton commented on IO-77:
-----------------------------------

Thanks Nicolas, can you open a new issue ticket for this please? Also this will have to go into the next Commons IO release because, although we have added new JKD 1.4 dependant implementations in Commons IO we are retaining compatibility with JDK 1.3 (thru' the compiler source/target options) for existing classes such as IOUtils.

Also your patch has *alot* of noise in it - as was the last one which took me a while to remove all the un-related/formatting changes. Small focused patches are much more likely to get applied since they take much less effort to review.

> Add convenience moveFile() / moveDirectory methods to FileUtils
> ---------------------------------------------------------------
>
>                 Key: IO-77
>                 URL: https://issues.apache.org/jira/browse/IO-77
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 1.3.2
>         Environment: Operating System: other
> Platform: Other
>            Reporter: nicolas de loof
>            Assignee: Niall Pemberton
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: IO-77-nio.patch, IO-77.patch, patch_io.txt
>
>
> I'm using FileUtils as it partially solves the missing "move" method for File,
> that is so simple to do in unix shell.
> A full implementation in FileUtils may be great :
> static boolean FileUtils.move(File src, File dest)
> throws IOException
> {
>     boolean rename = src.renameTo(dest);
>     if (!rename)
>     {
>         copyFile(file, dest);
>         file.delete();
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.