#pragma once #include "GlobalDefine.h" class CCsvData { public: void AddData(CString Str,bool bLineEnd); public: vector m_StrVecTemp; vector> m_DataVec; }; class CPropertie; //管理操作文件的功能 class CFileMgr { public: CFileMgr(void); ~CFileMgr(void); void GetFullFilePath(char *FilePath,CString FileName); void GetFullFilePath(CString &FilePath,CString FileName); void ReadFileToStringVec(const CString &FileName,vector &vec); void ReadFileToDoubleVec(const CString &FilePath,vector> &Vec); bool IsFileExist(CString FilePath); void GetChildFileOrDirName(bool bDir,CString strPath,vector & Vec,CString Suffix); void DeleteDirFile(CString FilePath); void DeleteDir(CString DirPath); void CreatDir(CString DirPath); bool CreateMultipleDirectory(const CString& szPath); void OpenDir(CString DirPath); void CopyFile(CString Path1,CString Path2); CString FileReName(CString FilePath,CString NewName); CString GetFileNameFromPath(CString Path,bool bDelSuffix); void WriteDbxyVecToFile(vector &vec,CString Path); CString GetWorkPath(); bool IsDirectoryExists(CString const& path); int ReadFileToStrVec(const CString &FilePath,vector> &Vec,bool bGapTab = false); void GetStringVal(CString Str,vector &Vec,bool bGapTab); void GetDoubleVal(CString Str,vector &Vec); BOOL ReNameFolder(LPCTSTR lpszFromPath,LPCTSTR lpszToPath); BOOL MoveFolder(LPCTSTR lpszFromPath,LPCTSTR lpszToPath); BOOL CopyFolder(LPCTSTR lpszFromPath,LPCTSTR lpszToPath); BOOL DeleteFolder(LPCTSTR lpszPath); BOOL CopyDirOrFile(CString src,CString dest); void WriteDataToExcel(CString DirPath,CString FileName,CCsvData &CsvData,bool bAppend); private: };