文件
_潇潇雨歇_
这个作者很懒,什么都没留下…
展开
-
C++ 获取系统时间
//Y年M月D日H时M分S秒M毫秒typedef enum DataType { YMD = 0,//年月日 YMDHMS,//年月日时分秒 YMDHMSM, //年月日时分秒毫秒 DMY,//日月年 MDY,//月日年 HMS,//时分秒 HMSM//时分秒毫秒}DATATYPE;string getSysTime(const DATATYPE& iMode, c...原创 2020-05-05 09:46:32 · 223 阅读 · 0 评论 -
C++ 目录中文件查找
bool sort_finddata_tByTimeCreateUp(const _finddata_t& f1, const _finddata_t& f2){ return f1.time_create < f2.time_create;}bool sort_finddata_tByTimeCreateDown(const _finddata_t& f...原创 2020-05-05 09:43:21 · 511 阅读 · 0 评论 -
C++ 文件输出
/* -- strFilePath - 文件路径 -- bIsBinary -是否为二进制文件读取方式*/bool outAllFile(const string& strFilePath, const string& strSrc, const unsigned int& uMode, const bool& bIsBinary) const{...原创 2020-05-05 09:39:35 · 207 阅读 · 0 评论 -
C++ 获取文件内容
/* @ Input Param: -- strFilePath - 文件路径 -- bIsBinary -是否为二进制文件读取方式*/string getAllFile(const string& strFilePath, const bool& bIsBinary){ string strRet = ""; ifstream inFile; if (...原创 2020-05-05 09:34:03 · 614 阅读 · 0 评论 -
windows C++ 递归创建文件夹
//eg: strPath = "D:\\file\\test\\1.txt" 递归检查并创建该路径中的文件夹void createFolderForPath(const string& strPath){ string strFolder; int iPos = strPath.find_last_of('\\'); if (iPos != -1) { strFold...原创 2020-05-05 09:29:45 · 1761 阅读 · 1 评论