【发布时间】:2020-11-17 09:57:37
【问题描述】:
我不知道如何使用 std::filesystem::path 识别绝对路径是否包含一些相对目录,但仍然没有运气。我有以下代码和平:
const std::filesystem::path absolutePath = "/Users/user/Library/Preferences";
const std::filesystem::path relativePath = "Library/Preferences";
bool isSubDir = isSubDirectory(absolutePath, relativePath);
isSubDirectory 在这种情况下应该返回 true。感谢任何帮助。
【问题讨论】:
标签: c++ path c++17 std-filesystem