C++(17):filesystem
作者:互联网
C++17将文件系统的操作封装了进来,从而可以跨平台的操作文件系统:
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <filesystem>
using namespace std::filesystem;
int main()
{
create_directories("./sandbox/a/b"); //在当前目录下创建层级目录sandbox/a/b
std::cout<<is_directory("./sandbox/a/b")<<std::endl; //输出:1
remove_all("./sandbox/a"); //删除目录sandbox/a
std::cout<<is_directory("./sandbox/a")<<std::endl; //输出:0
return 0;
}
https://blog.csdn.net/jiemashizhen/article/details/125712690
标签:std,17,C++,sandbox,filesystem,include 来源: https://www.cnblogs.com/xiaohai123/p/16475453.html