使用soui开发的mbc,只支持windows版本
w1146869587
2022-01-24 479b1995ef435713c2cf4f0da8de3a6af6c30922
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#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 );
};