Lines 29-34
Link Here
|
29 |
#include "mongo/platform/basic.h" |
29 |
#include "mongo/platform/basic.h" |
|
|
30 |
#include <fstream> |
30 |
#include <boost/filesystem.hpp> |
31 |
#include <boost/filesystem.hpp> |
31 |
#include "mongo/base/string_data.h" |
32 |
#include "mongo/base/string_data.h" |
Lines 47-53
class TestFile {
Link Here
|
47 |
public: |
48 |
public: |
48 |
TestFile(StringData contents, bool fixPerms = true) : _path(boost::filesystem::unique_path()) { |
49 |
TestFile(StringData contents, bool fixPerms = true) : _path(boost::filesystem::unique_path()) { |
49 |
boost::filesystem::ofstream stream(_path, std::ios_base::out | std::ios_base::trunc); |
50 |
std::ofstream stream(_path, std::ios_base::out | std::ios_base::trunc); |
50 |
ASSERT_TRUE(stream.good()); |
51 |
ASSERT_TRUE(stream.good()); |
51 |
stream.write(contents.rawData(), contents.size()); |
52 |
stream.write(contents.rawData(), contents.size()); |