Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-403

[IO] copyFileToDirectory - Over-Write File

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Wish
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.4
    • Fix Version/s: 2.5
    • Component/s: Utilities
    • Labels:

      Description

      I came across a small annoyance at work today. I have code that takes a file and copies it to a mounted directory on a remote server. I am using FileUtils.copyFileToDirectory() to do the move, but it does not have an overwrite flag. If something goes wrong with the file transfer over the network, and only part of the file is transferred, all subsequent attempts are blocked by the fact that the file "already exists." I would like to see another overloaded copyFileToDirectory() method with a flag to overwrite the file if it already exists. The current behavior is to throw an IoException.

      Thanks!

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              belugabehr David Mollitor

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment