commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] Commented: (IO-215) FileUtils copy methods swallow date modification failures
Date Thu, 09 Sep 2010 18:29:36 GMT


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

View raw message