Interface FileUtils.CollocatedTempFile

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void move()
      Upon close, atomically moves temp file to target file it is collocated with overwriting target (if exists).
      • Methods inherited from interface java.io.Closeable

        close
    • Method Detail

      • move

        void move()
           throws java.io.IOException
        Upon close, atomically moves temp file to target file it is collocated with overwriting target (if exists). Invocation of this method merely signals that caller ultimately wants temp file to replace the target file, but when this method returns, the move operation did not yet happen, it will happen when this instance is closed.

        Invoking this method without writing to temp file FileUtils.TempFile.getPath() (thus, not creating a temp file to be moved) is considered a bug, a mistake of the caller. Caller of this method should ensure that this method is invoked ONLY when the temp file is created and moving it to its final place is required.

        Throws:
        java.io.IOException