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

FileUtils.moveToDirectory() exception documentation and exception message error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.11.0
    • 2.12.0
    • Utilities
    • None

    Description

      When executing

      FileUtils.moveToDirectory(new File('foobarbaz'), new File('/tmp'), false)

      while "foobarbaz" doesn't exist, I get

      java.io.FileNotFoundException: Source 'foobarbaz' does not exist 

      but the documentation doesn't mention "FileNotFoundException".

      OTOH, if "foobarbaz" exists both as source and in the destination directory, I get

      org.apache.commons.io.FileExistsException: File element in parameter 'null' already exists: '/tmp/foobarbaz'
      

      What's that "parameter 'null'"?

      Attachments

        Activity

          People

            Unassigned Unassigned
            Heinrichs Dirk Heinrichs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m