summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/attribute
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/tests/attribute
parent316b44c13d886ef9ff50b040f4a01f38dfd3f94c (diff)
Use std::filesystem to create and remove directories.
Diffstat (limited to 'searchlib/src/tests/attribute')
-rw-r--r--searchlib/src/tests/attribute/sourceselector/sourceselector_test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/searchlib/src/tests/attribute/sourceselector/sourceselector_test.cpp b/searchlib/src/tests/attribute/sourceselector/sourceselector_test.cpp
index c6091604a97..4ca2802d22d 100644
--- a/searchlib/src/tests/attribute/sourceselector/sourceselector_test.cpp
+++ b/searchlib/src/tests/attribute/sourceselector/sourceselector_test.cpp
@@ -6,7 +6,7 @@
#include <vespa/searchcommon/common/undefinedvalues.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/util/size_literals.h>
-#include <vespa/fastos/file.h>
+#include <filesystem>
#include <vespa/log/log.h>
LOG_SETUP("sourceselector_test");
@@ -161,8 +161,8 @@ Test::requireThatSelectorCanSaveAndLoad(bool compactLidSpace)
selector.compactLidSpace(maxDocId - 4);
}
- FastOS_FileInterface::EmptyAndRemoveDirectory(index_dir.c_str());
- FastOS_FileInterface::MakeDirIfNotPresentOrExit(index_dir.c_str());
+ std::filesystem::remove_all(std::filesystem::path(index_dir));
+ std::filesystem::create_directory(std::filesystem::path(index_dir));
SourceSelector::SaveInfo::UP save_info =
selector.extractSaveInfo(base_file_name);
@@ -177,7 +177,7 @@ Test::requireThatSelectorCanSaveAndLoad(bool compactLidSpace)
EXPECT_EQUAL(maxDocId + 2, selector2->getDocIdLimit());
}
- FastOS_FileInterface::EmptyAndRemoveDirectory(index_dir.c_str());
+ std::filesystem::remove_all(std::filesystem::path(index_dir));
}
void