[
https://issues.apache.org/jira/browse/IO-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907714#action_12907714
]
Sebb commented on IO-215:
-------------------------
OK, point taken.
How about adding new copyFileXX() and copyDirectoryXX() methods that do report
failures?
I don't think there's any point in adding a boolean reportError parameter as it
would only apply if preserveDates is true, so the methods would need new names.
Any suggestions?
It's a pity that changing the return from void to boolean is not binary
compatible, otherwise that would be an easy solution.
Maybe consider doing that for a major version update?
However the private internal copy methods could be changed to return true/false
without affecting binary compatibility of the public API.
> FileUtils copy methods swallow date modification failures
> ---------------------------------------------------------
>
> Key: IO-215
> URL: https://issues.apache.org/jira/browse/IO-215
> Project: Commons IO
> Issue Type: Bug
> Components: Utilities
> Reporter: Sebb
>
> FileUtils.doCopyDirectory(..) and .FileUtils.doCopyFile(..) both call the
> setLastModified() method, but fail to check if it succeeded or not.
> Surely if the caller has asked for the date to be preserved, failure to do so
> should be reported somehow?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.