diff options
author | Sergey Magidovich <mgsergio@mapswithme.com> | 2017-07-03 13:03:51 +0300 |
---|---|---|
committer | Yuri Gorshenin <mipt.vi002@gmail.com> | 2017-07-05 13:32:16 +0300 |
commit | 684e2ce0b9803a99eec2c05e1d92a5db3f060c07 (patch) | |
tree | 61dbd90b7cc411ee3279c6f3428eb2890e76d7d4 /platform | |
parent | 7d8853ea7c98f08a84f0bec04d9aab4e07c674e1 (diff) |
[OPENLR] Cut trafficMode from desktop app. Move it to a subproject.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/platform.cpp | 9 | ||||
-rw-r--r-- | platform/platform.hpp | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/platform/platform.cpp b/platform/platform.cpp index 6904fd4013..1746f3fd91 100644 --- a/platform/platform.cpp +++ b/platform/platform.cpp @@ -178,6 +178,15 @@ void Platform::GetFilesByType(string const & directory, unsigned typeMask, } } +// static +bool Platform::IsDirectory(string const & directory) +{ + EFileType fileType; + if (GetFileType(directory, fileType) != ERR_OK) + return false; + return fileType == FILE_TYPE_DIRECTORY; +} + string Platform::DeviceName() const { return OMIM_OS_NAME; diff --git a/platform/platform.hpp b/platform/platform.hpp index d79201a10c..78fe9d76a1 100644 --- a/platform/platform.hpp +++ b/platform/platform.hpp @@ -165,6 +165,7 @@ public: TFilesWithType & outFiles); static bool IsDirectoryEmpty(string const & directory); + static bool IsDirectory(string const & directory); static EError GetFileType(string const & path, EFileType & type); |