Index: src/libchcore/TLocalFilesystem.h =================================================================== diff -u -N -r27c262eb9cae55720e10f4886af6b5a82cb94fe9 -re96806b7f8ff7ca7e9f4afbea603e6351a3dc3e3 --- src/libchcore/TLocalFilesystem.h (.../TLocalFilesystem.h) (revision 27c262eb9cae55720e10f4886af6b5a82cb94fe9) +++ src/libchcore/TLocalFilesystem.h (.../TLocalFilesystem.h) (revision e96806b7f8ff7ca7e9f4afbea603e6351a3dc3e3) @@ -29,56 +29,55 @@ #include "TFileInfoFwd.h" #include "IFilesystem.h" -BEGIN_CHCORE_NAMESPACE - -class TAutoFileHandle; -class TLocalFilesystemFind; -class TLocalFilesystemFile; -class TSimpleDataBuffer; -class TFileTime; -class TOverlappedDataBuffer; - -class LIBCHCORE_API TLocalFilesystem : public IFilesystem +namespace chcore { -public: - TLocalFilesystem(); - virtual ~TLocalFilesystem(); + class TAutoFileHandle; + class TLocalFilesystemFind; + class TLocalFilesystemFile; + class TSimpleDataBuffer; + class TFileTime; + class TOverlappedDataBuffer; - virtual bool PathExist(const TSmartPath& strPath) override; // check for file or folder existence + class LIBCHCORE_API TLocalFilesystem : public IFilesystem + { + public: + TLocalFilesystem(); + virtual ~TLocalFilesystem(); - virtual bool SetFileDirectoryTime(const TSmartPath& pathFileDir, const TFileTime& ftCreationTime, const TFileTime& ftLastAccessTime, const TFileTime& ftLastWriteTime) override; - virtual bool SetAttributes(const TSmartPath& pathFileDir, DWORD dwAttributes) override; + virtual bool PathExist(const TSmartPath& strPath) override; // check for file or folder existence - virtual bool CreateDirectory(const TSmartPath& pathDirectory, bool bCreateFullPath) override; - virtual bool RemoveDirectory(const TSmartPath& pathFile) override; - virtual bool DeleteFile(const TSmartPath& pathFile) override; + virtual bool SetFileDirectoryTime(const TSmartPath& pathFileDir, const TFileTime& ftCreationTime, const TFileTime& ftLastAccessTime, const TFileTime& ftLastWriteTime) override; + virtual bool SetAttributes(const TSmartPath& pathFileDir, DWORD dwAttributes) override; - virtual bool GetFileInfo(const TSmartPath& pathFile, TFileInfoPtr& rFileInfo, const TBasePathDataPtr& spBasePathData = TBasePathDataPtr()) override; - virtual bool FastMove(const TSmartPath& pathSource, const TSmartPath& pathDestination) override; + virtual bool CreateDirectory(const TSmartPath& pathDirectory, bool bCreateFullPath) override; + virtual bool RemoveDirectory(const TSmartPath& pathFile) override; + virtual bool DeleteFile(const TSmartPath& pathFile) override; - virtual IFilesystemFindPtr CreateFinderObject(const TSmartPath& pathDir, const TSmartPath& pathMask) override; - virtual IFilesystemFilePtr CreateFileObject(const TSmartPath& pathFile) override; + virtual bool GetFileInfo(const TSmartPath& pathFile, TFileInfoPtr& rFileInfo, const TBasePathDataPtr& spBasePathData = TBasePathDataPtr()) override; + virtual bool FastMove(const TSmartPath& pathSource, const TSmartPath& pathDestination) override; - virtual EPathsRelation GetPathsRelation(const TSmartPath& pathFirst, const TSmartPath& pathSecond) override; + virtual IFilesystemFindPtr CreateFinderObject(const TSmartPath& pathDir, const TSmartPath& pathMask) override; + virtual IFilesystemFilePtr CreateFileObject(const TSmartPath& pathFile) override; - virtual bool GetDynamicFreeSpace(const TSmartPath& path, unsigned long long& rullFree) override; + virtual EPathsRelation GetPathsRelation(const TSmartPath& pathFirst, const TSmartPath& pathSecond) override; -private: - static TSmartPath PrependPathExtensionIfNeeded(const TSmartPath& pathInput); - static UINT GetDriveData(const TSmartPath& spPath); - DWORD GetPhysicalDiskNumber(wchar_t wchDrive); + virtual bool GetDynamicFreeSpace(const TSmartPath& path, unsigned long long& rullFree) override; -private: + private: + static TSmartPath PrependPathExtensionIfNeeded(const TSmartPath& pathInput); + static UINT GetDriveData(const TSmartPath& spPath); + DWORD GetPhysicalDiskNumber(wchar_t wchDrive); + + private: #pragma warning(push) #pragma warning(disable: 4251) - std::map m_mapDriveLetterToPhysicalDisk; // caches drive letter -> physical disk number - boost::shared_mutex m_lockDriveLetterToPhysicalDisk; + std::map m_mapDriveLetterToPhysicalDisk; // caches drive letter -> physical disk number + boost::shared_mutex m_lockDriveLetterToPhysicalDisk; #pragma warning(pop) - friend class TLocalFilesystemFind; - friend class TLocalFilesystemFile; -}; + friend class TLocalFilesystemFind; + friend class TLocalFilesystemFile; + }; +} -END_CHCORE_NAMESPACE - #endif