[c++17标准库特性之新增STL特性] --- std::filesystem

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 = 

猜你喜欢

转载自blog.csdn.net/weixin_42445727/article/details/130046768