#pragma once /************************************************************************/ /* ×Ö·û´®ÎļþµØÖ·µÄ¹¤¾ßÀà */ /************************************************************************/ class CStrFileUtils { public: CStrFileUtils(void); ~CStrFileUtils(void); public: static CString GetPath(CString strFileFullName); static CString GetPath1(CString strFileFullName); static CString GetSimplePath(CString strFileFullName); static CString GetServerPath(CString strRootPath,CString strServerPath,CString strFilePathName); static CString GetFileName(CString strFileFullName); static CString GetFileExtName(CString strFileFullName); static CString GetSimpleFileName(CString strFileFullName); static CString GetDir( CString strFileName ); static CString GetRootDir( CString strFileName ); static bool DoRemoveDirectory(CString strDirName); static bool IsExist( CString strFileName); static bool IsDirExit( CString strPath ); static void CreateDir(CString strPath); static bool CopyTmpIniFile(CString strTmpIniName,CString strIniName); static bool CopySqliteDb3(CString strSrcDb,CString strTargetDb); static bool CreateFile( CString strFileName ); static CString GetCurModuleDir(); static CString GetLocalDt(); // µÃµ½µ±Ç°Ê±¼ä static __int64 GetFileSize(CString strFileFullName); // µÃµ½Îļþ´óС static CString GetClustersSize( CString &strPath ); // µÃµ½´ÅÅÌÊ£Óà¿Õ¼ä static bool IsEmptyDir( CString &strPath); // ÅжÏĿ¼ÊÇ·ñΪ¿Õ static bool HasFileOnNextLevel(CString &strPath); static CString GetFileSizeDisplayStr(__int64 u64FileSize); // ÏÔʾµ±Ç°µÄ´óС static CString GetFileFlowDisplayStr( CString strTime ); // ÏÔʾµ±Ç°µÄÁ÷Á¿ static CString GetRemainTimeDisplayStr( __int64 uRemainTime ); static bool HasSlashSplit(CString strSvrPath); // ÊÇ·ñÓз´Ð±Ïß·Ö¸î·û static CString GetLastErrorMessageString(DWORD dwLastError ); static bool OpenFile(CString strFileName,CString &strErrInfo); // ´ò¿ªÎļþ static bool OpenFolder(CString strPath,CString &strErrInfo); // Îļþ¼Ð static CString GetFileMdyTime(CString strFileName); // µÃµ½ÎļþÐÞ¸Äʱ¼ä public: static bool WriteFile( CString strFileName,CString strContent,CString &strErrInfo ); // дÎļþ static CString GetDirName( CString strFileID ); static bool GetStrFromFile( CString strFileName, CString &strBuf ); };