You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2024/02/05 13:38:00 UTC
[jira] [Resolved] (IO-384) New FileUtils method to copy file which might change in size
[ https://issues.apache.org/jira/browse/IO-384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary D. Gregory resolved IO-384.
--------------------------------
Fix Version/s: 2.16.0
Resolution: Fixed
This has been fixed at some point in the past few years.
> 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
> Fix For: 2.16.0
>
>
> 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)