资源简介
很好的文件操作工具类 好东西要分享
代码片段和文件信息
#include “StdAfx.h“
#include “FileUtil.h“
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#pragma warning(disable:4996)
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
FileUtil::FileUtil(void)
{
}
FileUtil::~FileUtil(void)
{
}
/*
* 创建路径(仅单级路径)
* 参数一:路径
* 返回:true创建成功(路径存在)/false创建失败
*/
BOOL FileUtil::createDir(CString path){
ifstream file;
file.open(path);
if (!file.is_open()) {//校验本地路径是否存在
//目录不存在
//本地创建路径
if(CreateDirectory(path NULL)){
return true;
}else{
return false;
}
}
return false;
}
/*
* 校验路径是否存在
* 参数一:路径
* 返回:true存在/false不存在
*/
BOOL FileUtil::checkDir(CString pat
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 0 2018-10-30 10:21 C++鏂囦欢鎿嶄綔宸ュ叿绫?
文件 7916 2017-09-20 11:26 C++鏂囦欢鎿嶄綔宸ュ叿绫?FileUtil.h
目录 0 2018-10-30 10:45 __MACOSX\
文件 0 2018-10-30 10:45 __MACOSX\C++鏂囦欢鎿嶄綔宸ュ叿绫?
文件 232 2017-09-20 11:26 __MACOSX\C++鏂囦欢鎿嶄綔宸ュ叿绫?._FileUtil.h
文件 23072 2017-09-20 11:16 C++鏂囦欢鎿嶄綔宸ュ叿绫?FileUtil.cpp
文件 176 2017-09-20 11:16 __MACOSX\C++鏂囦欢鎿嶄綔宸ュ叿绫?._FileUtil.cpp
文件 176 2018-10-30 10:21 __MACOSX\._C++鏂囦欢鎿嶄綔宸ュ叿绫?
- 上一篇:C++实现的图像小波变换_滤波_复原
- 下一篇:飞鸽传书linuxc语言源码项目
相关资源
- Thinking in C++中文版
- C++语言程序设计_第四版_郑莉_高清p
- 东南大学C++课件-何洁月80讲(总).
- DevC++
- C/C++实验系统
- 一个月挑战c++
- vsC++编程新手指导
- C++语言编程器
- VS2008 windows应用程序C++
- C++深入版
- C++PPT
- C++沉思录
- c++核心编程技术
- C++出错提示英汉对照
- c++/c语言学习系统
- C和C++安全编码(中文版)
- c++基础教程
- VC++6.0
- Microsoft Visual C++ 2010
- 嵌入式CC++语言精华文章集锦
- 交通灯管理仿真程序
- CC++库函数
- C++_STL使用例子大全
- C C++精华帖合辑(新手必看)
- C++ 基本语法及实例说明
- 《算法竞赛入门经典》
- C++API
- c++深度剖析木马程序
- c++练习题
- vc++6.0初学入门教程(PDF编辑版)
评论
共有 条评论