[
https://issues.apache.org/jira/browse/IO-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Niall Pemberton resolved IO-219.
--------------------------------
Assignee: Niall Pemberton
Fix Version/s: 2.0
Resolution: Fixed
I have added a new FileExistsException which the moveFile() and moveDirectory()
methods now throw
http://svn.apache.org/viewvc?view=revision&revision=982433
> Add support for moving a file to an existing path if the existing file is
> zero bytes in size -- org.apache.commons.io.FileUtils#moveFile(File, File)
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: IO-219
> URL: https://issues.apache.org/jira/browse/IO-219
> Project: Commons IO
> Issue Type: Improvement
> Components: Utilities
> Affects Versions: 1.4
> Reporter: Manuel Giesa
> Assignee: Niall Pemberton
> Priority: Minor
> Fix For: 2.0
>
>
> Howdy,
> org.apache.commons.io.FileUtils#moveFile(File, File) currently throws an
> IOException if the destination File already exists. IMHO this is the expected
> behavior in cases where the destination file has is at least one byte in
> size. But in some cases the user might want to create a file before calling
> this method to be sure it was created successfully and use another filename
> if not. Since a generic IOException is thrown in cases where the destination
> file does already exist a user not able to implement counter-measures for
> such cases. So i suggest to add another method for this case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.