diff options
author | Yuri Gorshenin <y@maps.me> | 2015-05-27 16:27:43 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:48:58 +0300 |
commit | 4f5feeaa7303181f07cc08092d6fdf357b3b154c (patch) | |
tree | 9624dbdbcc5abaf2629aa0f5bba141f2179a30f6 /platform/platform.hpp | |
parent | a9423b4f9f226f7e1f860cc8bd1a7fccd97890dc (diff) |
[platform] Implemented routines for directory reading and deletion.
Diffstat (limited to 'platform/platform.hpp')
-rw-r--r-- | platform/platform.hpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/platform/platform.hpp b/platform/platform.hpp index 7d916994c6..c54f04e1e9 100644 --- a/platform/platform.hpp +++ b/platform/platform.hpp @@ -24,7 +24,14 @@ public: ERR_OK = 0, ERR_UNKNOWN = 1 }; - + + enum EFileType + { + FILE_TYPE_UNKNOWN = 0x1, + FILE_TYPE_REGULAR = 0x2, + FILE_TYPE_DIRECTORY = 0x4 + }; + protected: /// Usually read-only directory for application resources string m_resourcesDir; @@ -79,6 +86,9 @@ public: /// Creates directory at filesystem EError MkDir(string const & dirName) const; + /// Removes empty directory from the filesystem. + static EError RmDir(string const & dirName); + /// @TODO create join method for string concatenation /// @return path for directory with temporary files with slash at the end @@ -110,6 +120,10 @@ public: static void GetFilesByRegExp(string const & directory, string const & regexp, FilesList & outFiles); //@} + static EError GetFilesByType(string const & directory, unsigned typeMask, FilesList & outFiles); + + static EError GetFileType(string const & path, EFileType & type); + /// @return false if file is not exist /// @note Check files in Writable dir first, and in ReadDir if not exist in Writable dir bool GetFileSizeByName(string const & fileName, uint64_t & size) const; |