diff --git a/src/mongo/shell/shell_utils_extended.cpp b/src/mongo/shell/shell_utils_extended.cpp index fbdddc13..5a909286 100644 --- a/src/mongo/shell/shell_utils_extended.cpp +++ b/src/mongo/shell/shell_utils_extended.cpp @@ -390,7 +390,7 @@ BSONObj writeFile(const BSONObj& args, void* data) { mode |= std::ios::binary; } - boost::filesystem::ofstream ofs{normalizedFilePath, mode}; + std::ofstream ofs{normalizedFilePath, mode}; uassert(40346, str::stream() << "failed to open file " << normalizedFilePath.string() << " for writing", diff --git a/src/mongo/db/auth/security_key_test.cpp b/src/mongo/db/auth/security_key_test.cpp index 1902eb93..5eba954b 100644 --- a/src/mongo/db/auth/security_key_test.cpp +++ b/src/mongo/db/auth/security_key_test.cpp @@ -29,6 +29,7 @@ #include "mongo/platform/basic.h" +#include #include #include "mongo/base/string_data.h" @@ -47,7 +48,7 @@ class TestFile { public: TestFile(StringData contents, bool fixPerms = true) : _path(boost::filesystem::unique_path()) { - boost::filesystem::ofstream stream(_path, std::ios_base::out | std::ios_base::trunc); + std::ofstream stream(_path, std::ios_base::out | std::ios_base::trunc); ASSERT_TRUE(stream.good()); stream.write(contents.rawData(), contents.size()); diff --git a/src/mongo/db/storage/storage_repair_observer.cpp b/src/mongo/db/storage/storage_repair_observer.cpp index 22b76a6a..6ee45a3e 100644 --- a/src/mongo/db/storage/storage_repair_observer.cpp +++ b/src/mongo/db/storage/storage_repair_observer.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #ifdef __linux__ #include @@ -121,7 +122,7 @@ bool StorageRepairObserver::isDataInvalidated() const { } void StorageRepairObserver::_touchRepairIncompleteFile() { - boost::filesystem::ofstream fileStream(_repairIncompleteFilePath); + std::ofstream fileStream(_repairIncompleteFilePath); fileStream << "This file indicates that a repair operation is in progress or incomplete."; if (fileStream.fail()) { LOGV2_FATAL_NOTRACE(50920, diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp index a7b73907..1fe627b1 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp @@ -33,6 +33,7 @@ #include "mongo/db/storage/kv/kv_engine_test_harness.h" +#include #include #include #include @@ -226,7 +227,7 @@ TEST_F(WiredTigerKVEngineRepairTest, UnrecoverableOrphanedDataFilesAreRebuilt) { // Create an empty data file. The subsequent call to recreate the collection will fail because // it is unsalvageable. - boost::filesystem::ofstream fileStream(*dataFilePath); + std::ofstream fileStream(*dataFilePath); fileStream << ""; fileStream.close(); diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp index 07fabadd..e701cb67 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp @@ -34,6 +34,7 @@ #include "mongo/db/storage/wiredtiger/wiredtiger_util.h" #include +#include #include #include @@ -80,7 +81,7 @@ void createTableChecksFile() { auto path = boost::filesystem::path(storageGlobalParams.dbpath) / boost::filesystem::path(kTableChecksFileName); - boost::filesystem::ofstream fileStream(path); + std::ofstream fileStream(path); fileStream << "This file indicates that a WiredTiger table check operation is in progress or " "incomplete." << std::endl; diff --git a/src/mongo/shell/shell_utils_extended.cpp b/src/mongo/shell/shell_utils_extended.cpp index 5a909286..919c2595 100644 --- a/src/mongo/shell/shell_utils_extended.cpp +++ b/src/mongo/shell/shell_utils_extended.cpp @@ -454,7 +454,7 @@ BSONObj readDumpFile(const BSONObj& a, void*) { // Open the file for reading in binary mode. const auto pathStr = a.firstElement().String(); - boost::filesystem::ifstream stream(pathStr, std::ios::in | std::ios::binary); + std::ifstream stream(pathStr, std::ios::in | std::ios::binary); uassert(31405, str::stream() << "readDumpFile(): Unable to open file \"" << pathStr << "\" for reading", diff --git a/src/mongo/util/stacktrace_threads.cpp b/src/mongo/util/stacktrace_threads.cpp index d2ee29d2..8afc33b4 100644 --- a/src/mongo/util/stacktrace_threads.cpp +++ b/src/mongo/util/stacktrace_threads.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -243,7 +244,7 @@ bool tidExists(int tid) { std::string readThreadName(int tid) { std::string threadName; try { - boost::filesystem::ifstream in(taskDir() / std::to_string(tid) / "comm"); + std::ifstream in(taskDir() / std::to_string(tid) / "comm"); std::getline(in, threadName); } catch (...) { } diff --git a/src/mongo/util/processinfo_linux.cpp b/src/mongo/util/processinfo_linux.cpp index eae0e9b7..93678119 100644 --- a/src/mongo/util/processinfo_linux.cpp +++ b/src/mongo/util/processinfo_linux.cpp @@ -33,6 +33,7 @@ #include "processinfo.h" +#include #include #include #include