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

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

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • P3: Somewhat important
    • Some future release
    • 4.4.0
    • Core: I/O
    • None

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

              tmacieir Thiago Macieira (closed Nokia identity) (Inactive)
              anshaw Andy Shaw (closed Nokia identity) (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes