summaryrefslogtreecommitdiff
path: root/src/mongo/unittest/temp_dir.h
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2015-06-20 00:22:50 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2015-06-20 10:56:02 -0400
commit9c2ed42daa8fbbef4a919c21ec564e2db55e8d60 (patch)
tree3814f79c10d7b490948d8cb7b112ac1dd41ceff1 /src/mongo/unittest/temp_dir.h
parent01965cf52bce6976637ecb8f4a622aeb05ab256a (diff)
downloadmongo-9c2ed42daa8fbbef4a919c21ec564e2db55e8d60.tar.gz
SERVER-18579: Clang-Format - reformat code, no comment reflow
Diffstat (limited to 'src/mongo/unittest/temp_dir.h')
-rw-r--r--src/mongo/unittest/temp_dir.h61
1 files changed, 32 insertions, 29 deletions
diff --git a/src/mongo/unittest/temp_dir.h b/src/mongo/unittest/temp_dir.h
index 070f0ea7217..a3dd3fcc2d2 100644
--- a/src/mongo/unittest/temp_dir.h
+++ b/src/mongo/unittest/temp_dir.h
@@ -32,36 +32,39 @@
namespace mongo {
namespace unittest {
+/**
+ * An RAII temporary directory that deletes itself and all contents files on scope exit.
+ */
+class TempDir {
+ MONGO_DISALLOW_COPYING(TempDir);
+
+public:
+ /**
+ * Creates a new unique temporary directory.
+ *
+ * Throws if this fails for any reason, such as bad permissions.
+ *
+ * The leaf of the directory path will start with namePrefix and have
+ * unspecified characters added to ensure uniqueness.
+ *
+ * namePrefix must not contain either / or \
+ */
+ explicit TempDir(const std::string& namePrefix);
+
/**
- * An RAII temporary directory that deletes itself and all contents files on scope exit.
+ * Delete the directory and all contents.
+ *
+ * This only does best-effort. In particular no new files should be created in the directory
+ * once the TempDir goes out of scope. Any errors are logged and ignored.
*/
- class TempDir {
- MONGO_DISALLOW_COPYING(TempDir);
- public:
- /**
- * Creates a new unique temporary directory.
- *
- * Throws if this fails for any reason, such as bad permissions.
- *
- * The leaf of the directory path will start with namePrefix and have
- * unspecified characters added to ensure uniqueness.
- *
- * namePrefix must not contain either / or \
- */
- explicit TempDir(const std::string& namePrefix);
+ ~TempDir();
- /**
- * Delete the directory and all contents.
- *
- * This only does best-effort. In particular no new files should be created in the directory
- * once the TempDir goes out of scope. Any errors are logged and ignored.
- */
- ~TempDir();
-
- const std::string& path() { return _path; }
+ const std::string& path() {
+ return _path;
+ }
- private:
- std::string _path;
- };
-} // namespace unittest
-} // namespace mongo
+private:
+ std::string _path;
+};
+} // namespace unittest
+} // namespace mongo