#pragma once #include "akCoreLinker.h" #include #include 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; };