Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7497

refactor and rationalize mongo/util/file.h, move code to new mongo/util/file.cpp

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.3.2
    • Affects Version/s: 2.3.0
    • Component/s: Internal Code
    • None
    • Fully Compatible

      The source code file mongo/util/file.h contains a File class based on a FileInterface class that is not used by any other derived class. All code for the File class is in the header file; there is no file.cpp. The code for Windows and non-Windows versions of the member functions do not align well; they print different messages on errors and in one case one version throws an massert while the other just logs a message. Neither version does a very good job of logging what failed on some errors. There is some code that might be moved into a "file" area, but it doesn't belong in a header file and so isn't easy to move.

            Assignee:
            tad Tad Marshall
            Reporter:
            tad Tad Marshall
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: