Deprecate usage of some functions in boost (#130)
Some checks failed
Build / build (push) Has been cancelled

* Deprecate usage of boost::filesystem::load_string_file and save_string_file

* some other deperated functions

* remove complete()

* normal, save, load
This commit is contained in:
Symious
2025-03-08 21:03:15 +08:00
committed by GitHub
parent 923bdd7c66
commit 3b273a6de2
5 changed files with 38 additions and 17 deletions

View File

@@ -35,17 +35,17 @@ using hf3fs::meta::InodeId;
static void print(const Path &path) {
fmt::print("path {}\n", path);
fmt::print("abs {}, complete {}, relative {}\n", path.is_absolute(), path.is_complete(), path.is_relative());
fmt::print("abs {}, relative {}\n", path.is_absolute(), path.is_relative());
fmt::print("has root {}, {}\n", path.has_root_path(), path.root_path());
fmt::print("has relative {}, {}\n", path.has_relative_path(), path.relative_path());
fmt::print("has branch {}, {}\n", path.has_parent_path(), path.branch_path());
fmt::print("has branch {}, {}\n", path.has_parent_path(), path.parent_path());
fmt::print("has stem {}, {}\n", path.has_stem(), path.stem());
fmt::print("has filename {}, {}, is dot {}, is dot dot {}\n",
path.has_filename(),
path.filename(),
path.filename_is_dot(),
path.filename_is_dot_dot());
fmt::print("has leaf {}, {}", path.has_leaf(), path.leaf());
fmt::print("has leaf {}, {}", !path.empty(), path.filename());
fmt::print("size {}, components {}, first {}, last {}\n",
path.size(),
std::distance(path.begin(), path.end()),

View File

@@ -196,7 +196,7 @@ TYPED_TEST(TestResolve, pathRange) {
auto path = PathAt("/a/b/c/d");
Path trace;
auto result = co_await PathResolveOp(*txn, aclCache, SUPER_USER, &trace).pathRange(path);
std::cout << "resolve " << *path.path << " -> " << trace << " " << trace.normalize() << std::endl;
std::cout << "resolve " << *path.path << " -> " << trace << " " << trace.lexically_normal() << std::endl;
CO_ASSERT_OK(result);
CO_ASSERT_TRUE(result->missing.empty()) << result->missing;
CO_ASSERT_EQ(result->getParentId(), c.id);
@@ -208,7 +208,7 @@ TYPED_TEST(TestResolve, pathRange) {
auto path = Path("/a/b/c/e");
Path trace;
auto result = co_await PathResolveOp(*txn, aclCache, SUPER_USER, &trace).pathRange(path);
std::cout << "resolve " << path << " -> " << trace << " " << trace.normalize() << std::endl;
std::cout << "resolve " << path << " -> " << trace << " " << trace.lexically_normal() << std::endl;
CO_ASSERT_OK(result);
CO_ASSERT_TRUE(result->missing.empty()) << result->missing;
CO_ASSERT_EQ(result->getParentId(), c.id);
@@ -221,7 +221,7 @@ TYPED_TEST(TestResolve, pathRange) {
Path trace;
auto result = co_await PathResolveOp(*txn, aclCache, SUPER_USER, &trace).pathRange(path);
CO_ASSERT_OK(result);
std::cout << "resolve " << *path.path << " -> " << trace << " " << trace.normalize() << std::endl;
std::cout << "resolve " << *path.path << " -> " << trace << " " << trace.lexically_normal() << std::endl;
CO_ASSERT_TRUE(result->missing.empty()) << result->missing;
CO_ASSERT_EQ(result->getParentId(), c.id);
CO_ASSERT_EQ(result->dirEntry.value(), dEntry);