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

Elliotte Rusty Harold commented on IO-384:
------------------------------------------

This issue is probably obsolete. FileUtils.copyFile now uses the Files.copy 
method in the JDK. doCopyFile and the implementation described here no longer 
exist.

> New FileUtils method to copy file which might change in size
> ------------------------------------------------------------
>
>                 Key: IO-384
>                 URL: https://issues.apache.org/jira/browse/IO-384
>             Project: Commons IO
>          Issue Type: New Feature
>            Reporter: Sebb
>            Priority: Major
>
> As mentioned in IO-383, FileUtils.doCopyFile caches the file size.
> This means that a growing file (e.g. a log file) may cause the method to 
> report failure.
> It might be useful to have a method which keeps looping until there is no 
> more input; this should not throw an IOE if the sizes are different.
> More data may have been added - or the file truncated - between completing 
> the copy and checking the size.
> The method should return the total bytes written; the caller can then check 
> if the count is OK.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to