diff options
author | Tor Egge <Tor.Egge@online.no> | 2022-06-02 16:35:21 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2022-06-02 19:22:21 +0200 |
commit | 914317d3db05758483eaea09a60ef8bfa3981948 (patch) | |
tree | 7b94d14f6215b8b66becb869e1b08c59d81a05e6 /searchcore/src/tests/proton/proton_disk_layout | |
parent | a51340034f1b4bc98096613af8f5736a2c974c96 (diff) |
Remove most use of vespalib::rmdir in searchcore.
Diffstat (limited to 'searchcore/src/tests/proton/proton_disk_layout')
-rw-r--r-- | searchcore/src/tests/proton/proton_disk_layout/proton_disk_layout_test.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/searchcore/src/tests/proton/proton_disk_layout/proton_disk_layout_test.cpp b/searchcore/src/tests/proton/proton_disk_layout/proton_disk_layout_test.cpp index 05d993a33e0..3d087808e44 100644 --- a/searchcore/src/tests/proton/proton_disk_layout/proton_disk_layout_test.cpp +++ b/searchcore/src/tests/proton/proton_disk_layout/proton_disk_layout_test.cpp @@ -10,6 +10,7 @@ #include <vespa/vespalib/testkit/testapp.h> #include <vespa/vespalib/test/insertion_operators.h> #include <vespa/vespalib/util/stringfmt.h> +#include <filesystem> using search::index::DummyFileHeaderContext; using search::transactionlog::client::TransLogClient; @@ -25,8 +26,8 @@ static const vespalib::string documentsDir(baseDir + "/documents"); struct FixtureBase { - FixtureBase() { vespalib::rmdir(baseDir, true); } - ~FixtureBase() { vespalib::rmdir(baseDir, true); } + FixtureBase() { std::filesystem::remove_all(std::filesystem::path(baseDir)); } + ~FixtureBase() { std::filesystem::remove_all(std::filesystem::path(baseDir)); } }; struct DiskLayoutFixture { @@ -41,7 +42,7 @@ struct DiskLayoutFixture { void createDirs(const std::set<vespalib::string> &dirs) { for (const auto &dir : dirs) { - vespalib::mkdir(documentsDir + "/" + dir, false); + std::filesystem::create_directory(std::filesystem::path(documentsDir + "/" + dir)); } } void createDomains(const std::set<vespalib::string> &domains) { |