»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | |
| | | #include "akCoreLinker.h" |
| | | |
| | | #include <vector> |
| | | #include <io.h> |
| | | |
| | | |
| | | using namespace std; |
| | | typedef vector<_finddatai64_t> VECFINDDATA; |
| | | |
| | | class AKCORE_DLLSPEC CakFileUtil |
| | | { |
| | | public: |
| | | CakFileUtil(void); |
| | | virtual ~CakFileUtil(void); |
| | | |
| | | //ë¶ìê²°ê³¼ ì´ê¸°í |
| | | void clear(); |
| | | |
| | | //íì¼ ì°¾ê¸° |
| | | void FindFile(char* pTargetPathName, bool bFindSubDir = true); |
| | | //íì´ ì´ë¦ ë³ê²½ |
| | | void RenameFile(char* pTargetPathName, char* pNewFileName, bool bFindSubDir = true); |
| | | void RenameFile(char* pTargetPathName, char* pFindWord, char* pReplaceWord, bool bFindSubDir = true); |
| | | //íì¼ìì |
| | | void DeleteFiles( char* pTargetPathName, bool bFindSubDir /*= true*/ ); |
| | | |
| | | //í´ë 찾기 |
| | | void FindFolder(char* pTargetPath, bool bFindSubDir = true); |
| | | //í´ë ì´ë¦ ë³ê²½ |
| | | void RenameFolder(char* pTargetPath, char* pNewFolderName, bool bFindSubDir = true); |
| | | void RenameFolder(char* pTargetPath, char* pFindWord, char* pReplaceWord, bool bFindSubDir = true); |
| | | //í´ë ìì |
| | | static void DeleteFolder( char* pTargetPath, bool bFindSubDir /*= true*/ ); |
| | | |
| | | //ë§ì§ë§ ìë¬ ì ë³´ |
| | | int getLastError(){return m_nLastError;}; |
| | | |
| | | //ë¶ì ê²°ê³¼ ì»ê¸° |
| | | VECFINDDATA* getFindData(){return &m_vecFinds;}; |
| | | int getFindSubDirCount(){return m_nFindSubCount;}; |
| | | VECFINDDATA* getProcessData(){return &m_vecProcess;}; |
| | | _finddatai64_t* getFindData(char* pName); |
| | | char* getProcessPath(){return m_nProcessPath;}; |
| | | |
| | | //í´ëê° ë³µì¬ íí[2016/4/5] |
| | | static int CopyFolder(char* strSrc, char* strDest, bool bSubDir = true); |
| | | static int MoveFolder(char* strSrc, char* strDest, bool bSubDir = true); |
| | | |
| | | static void MakeDirectory(char* pPath); |
| | | |
| | | //ì¼ë°ê¸°ë¥í¨ì |
| | | static char* getFileName(char* pPathFileName); |
| | | static char* getFileExt(char* pPathFileName); |
| | | static void getPath(char* strDest, int nDestSize, const char* strSource); |
| | | static int getLastPath(char* strDest, int nDestSize, char* strSource); |
| | | static char* getLastPath(char* pPath); |
| | | |
| | | |
| | | //ê²½ë¡ì 리 ë³ê²½(ex. ./aaa/bb/./bbb/../ -> ./aaa/bb/) |
| | | static void changeAbsolutePath(char* pPathFileName); |
| | | |
| | | static int isNetworkPath(char* pPath);//ë¤í°ìí¬ ê²½ë¡ê° ë§ë¤ë©´ ëë¶ë¶ ê²½ë¡ë¥¼ ë°ííë¤. íí[2016/4/8] |
| | | protected: |
| | | void FindFileSubDir(char* pTargetPath, char* pWildcard); |
| | | //void DeleteFolderSubDir(char* pTargetPath); |
| | | void makeAbPathWildcard(char* pTargetPath, char* pNewPath, int nNewPathSize, char* pWildcard, int nWildcardSize); //ì ë ê²½ë¡ ìì±ê³¼ ìì¼ë ì¹´ë를 ë¶ë¦¬ íë ìí |
| | | void FindFolderSubDir(const char* pTargetPath, const char* pWildcard); |
| | | void makeAbPathWildcardFolder(char* pTargetPath, char* pNewPath, int nNewPathSize, char* pWildcard, int nWildcardSize); //ì ë ê²½ë¡ ìì±ê³¼ ìì¼ë ì¹´ë를 ë¶ë¦¬ íë ìí (í´ëë¡ êµ¬ì±ëìì ê²½ì°) |
| | | |
| | | protected: |
| | | char m_nProcessPath[512]; |
| | | VECFINDDATA m_vecFinds; |
| | | VECFINDDATA m_vecProcess; |
| | | int m_nLastError; |
| | | int m_nFindSubCount; |
| | | }; |