Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-2082

Add an atomic rename() function that allows replacing existing files

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 4.4.0, 6.9.0 Beta1
    • Core: I/O
    • None
    • c22c344f2 (dev)

      Add an atomic rename() function, so that existing files can be replaced with new ones. The Unix way is:
      ::rename(old, new); // "new" is an existing file

      or:
      ::link(old, new);
      ::remove(old);

      on Windows, it requires using MoveFileEx with MOVEFILE_REPLACE_EXISTING. (We're currently using MoveFile)

      See http://msdn.microsoft.com/en-us/library/aa363875(VS.85).aspx for the example that ideally is possible for Qt to support.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            cnn Qt Core & Network
            anshaw Andy Shaw (closed Nokia identity) (Inactive)
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes