C++遍历文件夹下所有文件代码
代码语言:c++
所属分类:其他
代码描述:C++遍历文件夹下所有文件代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#include <iostream>
#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
using namespace std;
// 递归列出所有目录及文件
void recursion_scan_dir_file(char *dir, int depth)
{
DIR *p_dir = NULL;
struct dirent *p_entry = NULL;
struct stat statbuf;
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0