summaryrefslogtreecommitdiffstats
path: root/searchlib/src/apps
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2022-06-23 21:39:48 +0200
committerTor Egge <Tor.Egge@online.no>2022-06-23 21:39:48 +0200
commit09d546dfdd152ce4e69971fc8ce422d998cb523a (patch)
tree18da6c3d44a2a056fcc41a213f47feec26f2e30b /searchlib/src/apps
parent316b44c13d886ef9ff50b040f4a01f38dfd3f94c (diff)
Use std::filesystem to create and remove directories.
Diffstat (limited to 'searchlib/src/apps')
-rw-r--r--searchlib/src/apps/tests/biglogtest.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/searchlib/src/apps/tests/biglogtest.cpp b/searchlib/src/apps/tests/biglogtest.cpp
index d5c59bf5b29..bd8991edc4b 100644
--- a/searchlib/src/apps/tests/biglogtest.cpp
+++ b/searchlib/src/apps/tests/biglogtest.cpp
@@ -8,6 +8,7 @@
#include <vespa/vespalib/util/size_literals.h>
#include <vespa/vespalib/util/threadstackexecutor.h>
#include <vespa/vespalib/data/databuffer.h>
+#include <filesystem>
using namespace search;
using search::index::DummyFileHeaderContext;
@@ -148,9 +149,8 @@ Test::testDIO()
{
uint64_t serial = 0;
- FastOS_File::EmptyDirectory(_dir.c_str());
- FastOS_File::RemoveDirectory(_dir.c_str());
- EXPECT_TRUE(FastOS_File::MakeDirectory(_dir.c_str()));
+ std::filesystem::remove_all(std::filesystem::path(_dir));
+ std::filesystem::create_directory(std::filesystem::path(_dir));
Map lidToBlobMap;
vespalib::DataBuffer buf;
@@ -238,7 +238,6 @@ Test::testDIO()
factory<DS> ds(_dir);
checkBlobs(ds(), lidToBlobMap);
}
- FastOS_File::EmptyDirectory(_dir.c_str());
- FastOS_File::RemoveDirectory(_dir.c_str());
+ std::filesystem::remove_all(std::filesystem::path(_dir));
TEST_FLUSH();
}