Index: src/ch/TLocalFilesystem.h =================================================================== diff -u -N -re30c2b40bd1b533d8740edc88d80b2fb340f3466 -r1456ff2ae4a98c83f18d20dc253a24f26ddf521d --- src/ch/TLocalFilesystem.h (.../TLocalFilesystem.h) (revision e30c2b40bd1b533d8740edc88d80b2fb340f3466) +++ src/ch/TLocalFilesystem.h (.../TLocalFilesystem.h) (revision 1456ff2ae4a98c83f18d20dc253a24f26ddf521d) @@ -28,16 +28,44 @@ class CFileInfo; typedef boost::shared_ptr CFileInfoPtr; +class TLocalFilesystemFind; + class TLocalFilesystem { public: static void GetDriveData(const chcore::TSmartPath& spPath, int *piDrvNum, UINT *puiDrvType); static bool PathExist(chcore::TSmartPath strPath); // check for file or folder existence - static bool SetFileDirectoryTime(LPCTSTR lpszName, const FILETIME& ftCreationTime, const FILETIME& ftLastAccessTime, const FILETIME& ftLastWriteTime); + static bool SetFileDirectoryTime(const chcore::TSmartPath& pathFileDir, const FILETIME& ftCreationTime, const FILETIME& ftLastAccessTime, const FILETIME& ftLastWriteTime); static bool CreateDirectory(const chcore::TSmartPath& pathDirectory); static bool GetFileInfo(const chcore::TSmartPath& pathFile, CFileInfoPtr& rFileInfo, size_t stSrcIndex = std::numeric_limits::max(), const chcore::TPathContainer* pBasePaths = NULL); + static bool FastMove(const chcore::TSmartPath& pathSource, const chcore::TSmartPath& pathDestination); + + static TLocalFilesystemFind CreateFinder(const chcore::TSmartPath& pathDir, const chcore::TSmartPath& pathMask); + +private: + static chcore::TSmartPath PrependPathExtensionIfNeeded(const chcore::TSmartPath& pathInput); + + friend class TLocalFilesystemFind; }; +class TLocalFilesystemFind +{ +public: + ~TLocalFilesystemFind(); + + bool FindNext(CFileInfoPtr& rspFileInfo); + void Close(); + +private: + TLocalFilesystemFind(const chcore::TSmartPath& pathDir, const chcore::TSmartPath& pathMask); + +private: + const chcore::TSmartPath m_pathDir; + const chcore::TSmartPath m_pathMask; + HANDLE m_hFind; + + friend class TLocalFilesystem; +}; #endif