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

Gary D. Gregory commented on IO-700:
------------------------------------

Hi [~tproko]

Thank you for your report.

Feel free to provide a PR on GitHub for the new method (with unit tests.)

TY!
Gary

> Provide FileUtils.moveFile(srcFile, dstFile, preserveFileDate)
> --------------------------------------------------------------
>
>                 Key: IO-700
>                 URL: https://issues.apache.org/jira/browse/IO-700
>             Project: Commons IO
>          Issue Type: Bug
>    Affects Versions: 2.8.0
>            Reporter: tza
>            Priority: Major
>
> The current implementation 2.8.0 throws an Exception, if moveFiles or 
> copyFiles (with preserveFileDate=true) cannot update the lastModifiedDate. 
> This was not the case in 2.6.
>  
> For FileUtils.moveFile the copyFile(File, File) method is used, which results 
> in a copy with preserveFileDate=true. Could you provide a method overload to 
> moveFile similiar to copyFile.
>  
> {code:java}
> public static void moveFile(final File srcFile, final File destFile) throws 
> IOException {
>   moveFile(srcFile, destFile, true);
> }
> public static void moveFile(final File srcFile, final File destFile, boolean 
> preserveFileDate) throws IOException {
>   ...
>   copyFile(srcFile, destFile, preserveFileDate);
> }
> {code}
>  
> (We have a cifs mount where the server is not allowing the update)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to