commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (IO-77) Add convenience moveFile() / moveDirectory methods to FileUtils
Date Thu, 10 Jan 2008 15:09:34 GMT

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

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

OK I reverted to NPE since only Henri voted since and other committers wanted it that way:

http://svn.apache.org/viewvc?view=rev&revision=610810

> 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.


Mime
View raw message