C++ 遍历文件夹
来源:互联网 发布:2017成都软件行业 编辑:程序博客网 时间:2024/06/01 08:32
#include<iostream>
#include<string>
#include<io.h>
#include<string>
#include<io.h>
using namespace std;
void sadsadsa(std::string path, int layer)
{
struct _finddata_t filefind;
string curr = path + "\\*.*";
int done = 0, i, handle;
if ((handle = _findfirst(curr.c_str(), &filefind)) == -1)return;
while (!(done = _findnext(handle, &filefind)))
{
printf("%s\n", filefind.name);
if (!strcmp(filefind.name, "..")){
continue;
}
for (i = 0; i<layer; i++)cout << " ";
if ((_A_SUBDIR == filefind.attrib)) //是目录
{
printf("----------%s\n", filefind.name);
cout << filefind.name << "(dir)" << endl;
curr = path + "\\" + filefind.name;
}
else//不是目录,是文件
{
cout << path + "\\" + filefind.name << endl;
}
}
_findclose(handle);
}
0 0
- c遍历文件夹
- C/C++遍历文件夹
- c 遍历文件夹
- C/C++ 遍历文件夹
- C#--遍历文件夹实例
- C/C++遍历文件夹
- c/c++遍历文件夹
- C、 C++遍历文件夹,删除文件夹
- linux下C遍历文件夹
- C语言实现遍历文件夹
- C遍历文件夹下文件
- 如何c语言遍历文件夹
- Linux C 文件夹遍历接口.
- Linux C语言遍历文件夹
- C、C++文件夹文件遍历
- 文件夹遍历代码C++(win32平台)
- C/C++遍历文件夹(转)
- C Windows 读取文件夹 遍历文件
- 002Add Two Numbers
- 简易程序--读jpg到txt
- JavaScript只能输入数字和两位小数
- ubuntu1404 开发环境配置
- WebLogic连接池错误: BEA-001153
- C++ 遍历文件夹
- 瀑布流(jquery)
- datagridview控件中使用comboBox控件(datagridviewcomboboxcolumn类)
- A journey of a packet within OpenContrail
- tomcat远程调试
- leetcode String to Integer (atoi) java基本编程学习(二)
- CASE WHEN 及 SELECT CASE WHEN的用法
- java基于Socket设计一个Mail的收发客户端
- SQL Server 2016:内存列存储索引