ubuntu c++ 获得主目录以及子目录下所有文件
#include <glob.h>
#include <vector>
#include<string>
#include <sys/stat.h>
using namespace std;
int judge(string path)
{
struct stat s;
if (stat(path.c_str(), &s) == 0)
{
if(s.st_mode & S_IFDIR)
原创
2021-12-09 16:13:17 ·
982 阅读 ·
0 评论