[New STL features of c++17 standard library features] --- std::filesystem

1 Introduction to std::filesystem

The filesystem library in the C++17 standard library provides functions and classes to work with files and directories. The following are some commonly used methods:

1.1 std::filesystem::path

std::filesystem::path represents the path of a file or directory. We can initialize a std::filesystem::path object using a string or a raw string literal.

#include <filesystem>

namespace fs = std::filesystem;

int main() {
   
    
    
    fs::path path1 = 

Guess you like

Origin blog.csdn.net/weixin_42445727/article/details/130046768