[SERVER-7497] refactor and rationalize mongo/util/file.h, move code to new mongo/util/file.cpp Created: 28/Oct/12 Updated: 11/Jul/16 Resolved: 13/Dec/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | 2.3.0 |
| Fix Version/s: | 2.3.2 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Tad Marshall | Assignee: | Tad Marshall |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Participants: | |||||||||
| Description |
|
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. |
| Comments |
| Comment by auto [ 13/Dec/12 ] |
|
Author: {u'date': u'2012-12-13T16:04:53Z', u'email': u'tad@10gen.com', u'name': u'Tad Marshall'}Message: Remove the FileInterface base class. Move the code for non-trivial members |