![[c++17标准库特性之新增STL特性] --- std::filesystem](http://pic.ttrar.cn/nice/%5bc17%e6%a0%87%e5%87%86%e5%ba%93%e7%89%b9%e6%80%a7%e4%b9%8b.jpg)
1 std::filesystem介绍
C++17 标准库中的文件系统库提供了一些函数和类来处理文件和目录。以下是一些常用的方法介绍:
1.1 std::filesystem::path
std::filesystem::path 表示文件或目录的路径。我们可以使用字符串或原始字符串字面量来初始化 std::filesystem::path 对象。
#include <filesystem>namespace fs = std::filesystem;int main() {fs::path path1 =