c++如何读取.{20D04FE0-3AEA-1069-A2D8-08002B30309D}下的内容
来源:互联网 发布:linux wget https 404 编辑:程序博客网 时间:2024/04/30 19:26
// ConsoleApplication2.cpp : 定义控制台应用程序的入口点。
直接上代码,我们在写一写比较加密的东西的时候可以用这个来.{20D04FE0-3AEA-1069-A2D8-08002B30309D}加密文件夹,但是,之后怎么去查看就得用代码了。
//
#include "stdafx.h"
#include "windows.h "
#include "shellapi.h "
#include"assert.h"
#include"stdlib.h"
//#include"winsock2.h"
#include "string"
#include"Wininet.h"
#include"iostream"
#include "windows.h"
#include"io.h"
#include"vector"
using namespace std;
void getFiles(string path, vector<string>& files)
{
//文件句柄
long hFile = 0;
//文件信息
struct _finddata_t fileinfo;
string p;
if ((hFile = _findfirst(p.assign(path).append("\\*").c_str(), &fileinfo)) !=-1)
{
do
{
//如果是目录,迭代之
//如果不是,加入列表
if ((fileinfo.attrib & _A_SUBDIR))
{
if (strcmp(fileinfo.name, ".") != 0 && strcmp
(fileinfo.name, "..") != 0)
getFiles(p.assign(path).append("\\").append
(fileinfo.name), files);
}
else
{
files.push_back(p.assign(path).append("\\").append
(fileinfo.name));
}
} while (_findnext(hFile, &fileinfo) == 0);
_findclose(hFile);
}
}
int _tmain(int argc, _TCHAR* argv[])
{
char path[256] = {"C:\\Users\\cql\\Desktop\\新建文件夹.{20D04FE0-3AEA-1069-A2D8-08002B30309D}"};//定义一个数组来装路径
vector<string> files;//定义一个容器来装目录下的文件
char filePath[256];//定义数组
memset(filePath, 0, sizeof(filePath));
memcpy(filePath, path, 256);
getFiles(filePath, files);//将文件夹的路径和容器传入函数返回给files
getchar();
return 0;
}
- c++如何读取.{20D04FE0-3AEA-1069-A2D8-08002B30309D}下的内容
- 关于com1.{21ec2020-3aea-1069-a2dd-08002b30309d}的东东
- 关于com1.{21ec2020-3aea-1069-a2dd-08002b30309d}的东东
- Android下如何读取文件的内容
- 如何读取其它网站的网页内容?
- 如何读取csv文件的内容
- .net如何读取PDF文档的内容
- 如何修改并读取StatusBar的内容
- 如何读取损坏的dvd内容
- 如何读取xml配置文件的内容
- 如何读取.properties配置文件的内容
- C语言读取文件的内容
- 读取 assets 下 db文件的内容
- 读取Resources下的文件内容
- Objective-C学习-如何读取输出文件内容
- 如何读取ppt内容
- c#读取Excel内容
- C读取文件内容
- 48-信号大结局
- 架构为什么会腐化
- 回调和观察者模式的关系
- tomcat 与 nginx,apache的区别及优缺点
- visio画图旋转任意角度,不保留白边保存pdf格式
- c++如何读取.{20D04FE0-3AEA-1069-A2D8-08002B30309D}下的内容
- 字体设计:拉丁字母字体书写方法分类
- 国内有基于GamePlay3D的游戏
- xml与Java对象的转换
- 高性能基础知识
- RandomAccessFile小节
- Web 前端学习笔记之 HTML 入门(2)
- Android学习之activity用法举例
- Pynlpir词性标记集