diff options
author | Yuri Gorshenin <y@maps.me> | 2015-05-27 19:11:28 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:48:59 +0300 |
commit | 8dfa6408167db3c75710bb92776127992c64c54b (patch) | |
tree | 434fd165cf74f31b9cd18f4ee8eac402e741d0f8 /platform/platform.hpp | |
parent | 4f5feeaa7303181f07cc08092d6fdf357b3b154c (diff) |
Review fixes.
Diffstat (limited to 'platform/platform.hpp')
-rw-r--r-- | platform/platform.hpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/platform/platform.hpp b/platform/platform.hpp index c54f04e1e9..28698ed1c2 100644 --- a/platform/platform.hpp +++ b/platform/platform.hpp @@ -22,7 +22,10 @@ public: enum EError { ERR_OK = 0, - ERR_UNKNOWN = 1 + ERR_FILE_DOES_NOT_EXIST, + ERR_ACCESS_FAILED, + ERR_DIRECTORY_NOT_EMPTY, + ERR_UNKNOWN }; enum EFileType @@ -63,6 +66,9 @@ protected: /// Hash some unique string into uniform format. static string HashUniqueID(string const & s); + /// Returns last system call error as EError. + static EError ErrnoToError(); + public: Platform(); @@ -120,7 +126,7 @@ public: static void GetFilesByRegExp(string const & directory, string const & regexp, FilesList & outFiles); //@} - static EError GetFilesByType(string const & directory, unsigned typeMask, FilesList & outFiles); + static void GetFilesByType(string const & directory, unsigned typeMask, FilesList & outFiles); static EError GetFileType(string const & path, EFileType & type); |