- 13
- 0
- 约2.4万字
- 约 33页
- 2016-12-03 发布于河南
- 举报
Visual_C文件操作大全
Visual_C+ 文件操作大全
f7f
1.创建文件夹
CreateDirectory(%%1,NULL);
2.创建文件
CFile file;
file.Open(%%1,CFile::modeCreate|CFile::modeWrite);
3.删除文件
DeleteFile(%%1);
4.删除文件夹
RemoveDirectory(%%1);
5.删除一个目录下所有的文件夹
CFileFind finder;
CString path;
path.Format(%s\\*.*,%%1);
BOOL bWorking = finder.FindFile(path);
while (bWorking)
{
bWorking = finder.FindNextFile();
if (finder.IsDirectory())
{
RemoveDirectory(finder.GetFilePath());
}
}
6.清空文件夹
RemoveDirectory(%%1);
CreateDirectory(%%1,NULL);
7.读取文件
char sRead[5120];
CFile mFile(_T(%%1),CFile::modeRead);
while (sRead!=NUL
您可能关注的文档
- 英语题29.doc
- web代码集锦.doc
- Dreamweaver代码.doc
- 初二英语学习.doc
- 13春《大学英语1》作业六.doc
- JavaScript-js宝典学习笔记.doc
- 常用JS代码.doc
- 铁路注册js.doc
- 类似google支持FF的拖动层效果.doc
- 赶集网注册 脚本 代码.doc
- 50万吨汽油调和技改项目环评报告书.pdf
- 河北省文安县第一中学2025-2026学年高一上学期10月月考英语试题(解析版).docx
- 河南省TOP二十校205—2026学年高一上学期10月联考生物试题(原卷版).docx
- 河南省安阳市第一中学、鹤壁市高中、新乡市第一中学三校2025-2026学年高一上学期第一次联考数学试题(解析版).docx
- 河南省部分高中2025-2026学年高一上学期第二次月考数学试卷(解析版).docx
- 河南省百师联盟2025-2026学年高二10月联考数学试题(北师大版)(解析版).docx
- 河南省部分学校2025-2026学年高一上学期期中考试数学试题(解析版).docx
- 河南省部分重点中学2025~2026学年高二上学期10月末质量检测数学试题(解析版).docx
- 河南省部分重点中学2025-2026学年高二上学期10月末质量检测英语试题(解析版).docx
- 桥梁伸缩缝安装工艺(可编辑).pptx
原创力文档

文档评论(0)